Skip to content

Commit 6e5dd86

Browse files
chore(QTDI-1553): build-in studio modules release (#1072)
1 parent cda75f6 commit 6e5dd86

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (C) 2006-2025 Talend Inc. - www.talend.com
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
set -xe
19+
20+
# Parameters:
21+
# $1: release version
22+
# $2: next version
23+
# $3: extra build args for all mvn cmd
24+
main() {
25+
local releaseVersion="${1?Missing release version}"; shift
26+
local nextVersion="${1?Missing actual project version}"; shift
27+
local extraBuildParams=("$@")
28+
29+
printf ">> Maven perform release"
30+
31+
# todo: add gpg2 profile for signing artifacts
32+
local release_profiles="release-zl"
33+
34+
# set the release version in the pom.xml
35+
mvn versions:set -DnewVersion="${releaseVersion}"
36+
37+
mvn clean deploy \
38+
--file "component-studio/pom.xml" \
39+
--define arguments="-DskipTests -DskipITs -Dcheckstyle.skip -Denforcer.skip=true -Drat.skip" \
40+
--settings .jenkins/settings.xml \
41+
--activate-profiles ${release_profiles} \
42+
"${extraBuildParams[@]}"
43+
44+
mvn versions:set -DnewVersion="${nextVersion}"
45+
}
46+
47+
main "$@"

ci/Jenkinsfile-release

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ pipeline {
138138
sectionHeaderStyle: """ background-color: #A9A9A9;
139139
text-align: center; font-size: 35px !important; font-weight : bold; """)
140140
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
141+
booleanParam(
142+
name: 'RELEASE_STUDIO_MODULES',
143+
defaultValue: true,
144+
description: '''Activate release of studio modules.
145+
EXPERT USER ONLY: to solve specials case eg: release ok but it fails for the Studio modules.
146+
''')
141147
booleanParam(
142148
name: 'NO_STAGING',
143149
defaultValue: false,
@@ -389,6 +395,26 @@ pipeline {
389395
}
390396
}
391397

398+
stage('Release studio modules') {
399+
when {
400+
expression { params.RELEASE_STUDIO_MODULES }
401+
}
402+
steps {
403+
withCredentials([nexusCredentials,
404+
ossrhCredentials,
405+
jiraCredentials,
406+
gpgCredentials]) {
407+
408+
script {
409+
echo "Perform release"
410+
sh "bash .jenkins/scripts/release/release-3.1-perform-studio.sh $releaseVersion \
411+
$nextVersion \
412+
$extraBuildParams"
413+
}
414+
}
415+
}
416+
}
417+
392418
stage('Release Docker image') {
393419
when {
394420
expression { !params.NO_DOCKER }

0 commit comments

Comments
 (0)