Skip to content

Commit

Permalink
Refs #142010 - Optimize Volto-addons gitflow pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 committed Nov 23, 2021
1 parent a04ee43 commit eccf195
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ pipeline {
stages {

stage('Code') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
not { branch 'master' }
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
steps {
parallel(

Expand All @@ -36,6 +43,13 @@ pipeline {
}

stage('Tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
not { branch 'master' }
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
steps {
parallel(

Expand Down Expand Up @@ -75,6 +89,13 @@ pipeline {
}

stage('Integration tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
not { branch 'master' }
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
steps {
parallel(

Expand Down Expand Up @@ -122,11 +143,13 @@ pipeline {
}

stage('Report to SonarQube') {
// Exclude Pull-Requests
when {
allOf {
environment name: 'CHANGE_ID', value: ''
}
anyOf {
branch 'master'
branch 'develop'
}
not { changelog '.*^Automated release [0-9\\.]+$' }
}
steps {
node(label: 'swarm') {
Expand Down Expand Up @@ -156,8 +179,8 @@ pipeline {
steps {
node(label: 'docker') {
script {
if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
error "Pipeline aborted due to PR not made from develop or hotfix branch"
if ( env.CHANGE_BRANCH != "develop" ) {
error "Pipeline aborted due to PR not made from develop branch"
}
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
Expand Down

0 comments on commit eccf195

Please sign in to comment.