Skip to content

Commit

Permalink
- Changed the Jenkinsfile to deploy for "main" not "develop"
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdutz committed Feb 11, 2021
1 parent d5f664b commit ff0cb9f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pipeline {
stage('Build') {
when {
expression {
env.BRANCH_NAME != 'develop'
env.BRANCH_NAME != 'main'
}
}
steps {
Expand All @@ -93,9 +93,9 @@ pipeline {
}
}

stage('Build develop') {
stage('Build main') {
when {
branch 'develop'
branch 'main'
}
steps {
echo 'Building'
Expand All @@ -122,7 +122,7 @@ pipeline {

stage('Deploy') {
when {
branch 'develop'
branch 'main'
}
// Only the official build nodes have the credentials to deploy setup.
agent {
Expand Down Expand Up @@ -156,7 +156,7 @@ pipeline {
// If this build failed, send an email to the list.
failure {
script {
if(env.BRANCH_NAME == "develop") {
if(env.BRANCH_NAME == "main") {
emailext(
subject: "[BUILD-FAILURE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
body: """
Expand All @@ -174,7 +174,7 @@ Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANC
// If this build didn't fail, but there were failing tests, send an email to the list.
unstable {
script {
if(env.BRANCH_NAME == "develop") {
if(env.BRANCH_NAME == "main") {
emailext(
subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
body: """
Expand All @@ -195,7 +195,7 @@ Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANC
// (in this cae we probably don't have to do any post-build analysis)
deleteDir()
script {
if ((env.BRANCH_NAME == "develop") && (currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
if ((env.BRANCH_NAME == "main") && (currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
emailext (
subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
body: """
Expand Down

0 comments on commit ff0cb9f

Please sign in to comment.