Skip to content

Commit

Permalink
[JENKINS] Refs #142010 - Optimize Volto-addons gitflow pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 committed Dec 3, 2021
1 parent bc36cf5 commit fdecddd
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ pipeline {

stages {

stage('Release') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'master'
}
}
steps {
node(label: 'docker') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
}
}
}
}

stage('Code') {
when {
allOf {
Expand Down Expand Up @@ -46,7 +63,6 @@ pipeline {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
not { branch 'master' }
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
Expand Down Expand Up @@ -92,7 +108,6 @@ pipeline {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
not { branch 'master' }
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
Expand Down Expand Up @@ -191,23 +206,6 @@ pipeline {
}
}

stage('Release') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'master'
}
}
steps {
node(label: 'docker') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
}
}
}
}

}

post {
Expand Down

0 comments on commit fdecddd

Please sign in to comment.