Skip to content

Commit

Permalink
Adjust release pipelines for the Apache 10 release (apache#2081)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigonull committed Sep 17, 2024
1 parent a0812e4 commit d52c19a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,13 @@ pipeline {
.withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS ? [ env.KOGITO_APPS_BUILD_MVN_OPTS ] : [])
.skipTests(skipTests)

def Closure mavenRunClosure = {
configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
mavenCommand.withSettingsXmlFile(MAVEN_SETTINGS_FILE)
.run("clean $installOrDeploy")
}
}
if (isRelease()) {
release.gpgImportKeyFromStringWithoutPassword(getReleaseGpgSignKeyCredsId())
mavenCommand.withProfiles(['apache-release'])
mavenRunClosure()
} else {
mavenRunClosure()
}

configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) {
mavenCommand.withSettingsXmlFile(MAVEN_SETTINGS_FILE).run("clean $installOrDeploy")
}
}
}
Expand All @@ -153,6 +148,11 @@ pipeline {
} else {
println '[WARN] no changes to commit'
}

// Create a new tag
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.tagRepository(getGitTagName())
githubscm.pushRemoteTag('origin', getGitTagName(), getGitAuthorPushCredsId())
}
}
}
Expand Down Expand Up @@ -280,3 +280,7 @@ String getReleaseGpgSignKeyCredsId() {
String getReleaseGpgSignPassphraseCredsId() {
return env.RELEASE_GPG_SIGN_PASSPHRASE_CREDS_ID
}

String getGitTagName() {
return params.GIT_TAG_NAME
}
2 changes: 1 addition & 1 deletion .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ void setupReleaseDeployJob() {
booleanParam('CREATE_PR', false, 'Should we create a PR with the changes ?')
stringParam('PROJECT_VERSION', '', 'Optional if not RELEASE. If RELEASE, cannot be empty.')
stringParam('KOGITO_PR_BRANCH', '', 'PR branch name')
stringParam('GIT_TAG_NAME', '', 'Git tag to create. i.e.: 10.0.0-rc1')

booleanParam('SEND_NOTIFICATION', false, 'In case you want the pipeline to send a notification on CI channel for this run.')
}
Expand Down Expand Up @@ -303,7 +304,6 @@ void setupWeeklyDeployJob() {

booleanParam('SKIP_TESTS', false, 'Skip tests')


stringParam('GIT_CHECKOUT_DATETIME', '', 'Git checkout date and time - (Y-m-d H:i)')

booleanParam('SEND_NOTIFICATION', false, 'In case you want the pipeline to send a notification on CI channel for this run.')
Expand Down

0 comments on commit d52c19a

Please sign in to comment.