Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .jenkins/scripts/release/release-2-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@ set -xe
# $2: next version
# $3: tag name
# $4: extra build args for all mvn cmd
#
# Environment:
# DRY_RUN: when "true", release:prepare runs with -DdryRun=true. Poms are rewritten and validated
# locally, but nothing is committed, tagged or pushed. Defaults to false.
main() {
local releaseVersion="${1?Missing release version}"; shift
local nextVersion="${1?Missing actual project version}"; shift
local tagName="${1?Missing actual project version}"; shift
local extraBuildParams=("$@")

local dryRunParams=()
if [[ "${DRY_RUN:-false}" == "true" ]]; then
printf ">> DRY RUN: release:prepare will not commit, tag nor push\n"
dryRunParams=(--define dryRun=true)
fi

printf ">> Maven prepare release %s (next-dev: %s; tag: %s)\n" "${releaseVersion}" "${nextVersion}" "${tagName}"

local release_profiles="release,ossrh,gpg2"
Expand All @@ -41,6 +51,7 @@ main() {
--define arguments="-DskipTests -DskipITs -Dcheckstyle.skip -Denforcer.skip=true -Drat.skip" \
--settings .jenkins/settings.xml \
--activate-profiles "$release_profiles" \
"${dryRunParams[@]}" \
"${extraBuildParams[@]}"
}

Expand Down
12 changes: 11 additions & 1 deletion .jenkins/scripts/release_legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ set -xe
# $1: Branch
# $2: current version
# $3: extra build args for all mvn cmd
#
# NOTE: VersionController.getSnapshotVersion (tqa-e2e-tests-tool shared library), used by
# ci/Jenkinsfile-release, is the source of truth for the release version scheme.
# The bump below is kept in sync with it: on the calendar scheme 1.<YYMM>.<patch>,
# December rolls over to January of the next year (1.2612.0 -> 1.2701.0).
main() {
local branch="${1?Missing branch}"
local currentVersion="${2?Missing project version}"
Expand All @@ -39,7 +44,12 @@ main() {
if [[ ${branch} == 'master' ]]; then
maintenance_branch="maintenance/${maj}.${min}"
maintenance_version="${maj}.${min}.$((rev + 1))-SNAPSHOT"
min=$((min + 1))
if [[ ${#min} -eq 4 && ${min} == *12 ]]; then
# Calendar scheme 1.<YYMM>.<patch>: December rolls over to January of the next year
min=$((min + 89))
else
min=$((min + 1))
fi
rev="0"
else
rev=$((rev + 1))
Expand Down
14 changes: 8 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ pipeline {
defaultValue: false,
description: '''
Force MAVEN deploy stage for development branches. No effect on master and maintenance.
INFO: master/maintenance branch are deploying on <oss.sonatype.org>
dev branches are deploying on <artifacts-zl.talend.com>''')
INFO: master/maintenance branch deploys artefacts on <oss.sonatype.org>
dev branches deploys artefacts on <artifacts-zl.talend.com>''')
booleanParam(
name: 'DOCKER_PUSH',
defaultValue: false,
Expand All @@ -166,7 +166,7 @@ pipeline {
'component-starter-server',
'remote-engine-customizer',
'All'],
description: 'Choose which docker image you want to build and push. Only available if DOCKER_PUSH == True.')
description: 'Choose which Docker image you want to build and push. Only available if DOCKER_PUSH == True.')

///////////////////////////////////////////////////////////////////////////////////////////////////////////////
separator(name: "QUALIFIER_CONFIG",
Expand All @@ -181,7 +181,9 @@ pipeline {
description: '''
Deploy jars with the given version qualifier. No effect on master and maintenance.
- DEFAULT means the qualifier will be the Jira id extracted from the branch name.
From "user/JIRA-12345_some_information" the qualifier will be JIRA-12345.''')
From "user/JIRA-12345_some_information" the qualifier will be JIRA-12345.
If you want to deploy a snapshot version without qualifier, use the NO_QUALIFIER parameter below
''')

///////////////////////////////////////////////////////////////////////////////////////////////////////////////
separator(name: "ADVANCED_CONFIG",
Expand All @@ -193,7 +195,7 @@ pipeline {
string(
name: 'EXTRA_BUILD_PARAMS',
defaultValue: '',
description: 'Add some extra parameters to maven commands. Applies to all maven calls.')
description: 'Add some extra parameters to all maven commands.')
booleanParam(
name: 'DISABLE_SONAR',
defaultValue: false,
Expand Down Expand Up @@ -239,7 +241,7 @@ pipeline {
booleanParam(
name: 'JENKINS_DEBUG',
defaultValue: false,
description: 'Add an extra step to the pipeline allowing to keep the pod alive for debug purposes.')
description: 'Add an extra step to the pipeline to keep the pod alive for debug purposes.')
booleanParam(
name: 'NO_QUALIFIER',
defaultValue: false,
Expand Down
Loading
Loading