Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Commit

Permalink
fix(Jenkinsfile): Update and polish pipeline variables
Browse files Browse the repository at this point in the history
  • Loading branch information
igdianov committed Feb 13, 2020
1 parent 66060e1 commit 633ecb2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pipeline {
ORG = 'activiti'
APP_NAME = 'runtime-bundle'
VERSION = jx_release_version()
RELEASE_BRANCH = "master"
CHARTMUSEUM_CREDS = credentials('jenkins-x-chartmuseum')
GITHUB_CHARTS_REPO = "https://github.com/Activiti/activiti-cloud-helm-charts.git"
GITHUB_HELM_REPO_URL = "https://activiti.github.io/activiti-cloud-helm-charts/"
Expand All @@ -24,8 +25,7 @@ pipeline {
branch 'PR-*'
}
environment {
PROJECT_VERSION = maven_project_version()
VERSION = "$PROJECT_VERSION".replaceAll("SNAPSHOT","$BRANCH_NAME-$BUILD_NUMBER-SNAPSHOT")
VERSION = maven_project_version().replaceAll("SNAPSHOT","$BRANCH_NAME-$BUILD_NUMBER-SNAPSHOT")
PREVIEW_NAMESPACE = "$APP_NAME-$BRANCH_NAME".toLowerCase()
HELM_RELEASE = "$PREVIEW_NAMESPACE".toLowerCase()
}
Expand All @@ -47,12 +47,15 @@ pipeline {
}
stage('Build Release') {
when {
branch 'master'
branch "$RELEASE_BRANCH"
}
environment {
VERSION = jx_release_version()
}
steps {
container('maven') {
// ensure we're not on a detached head
sh "git checkout master"
sh "git checkout $RELEASE_BRANCH"
sh "git config --global credential.helper store"

sh "jx step git credentials"
Expand All @@ -75,7 +78,7 @@ pipeline {
}
stage('Promote to Environments') {
when {
branch 'master'
branch "$RELEASE_BRANCH"
}
steps {
container('maven') {
Expand Down

0 comments on commit 633ecb2

Please sign in to comment.