Skip to content

Commit

Permalink
mvp for multibranch jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
jredbeard committed Feb 4, 2017
1 parent 7f8d900 commit ecd3847
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!groovy
node {
stage 'Checkout'
checkout scm
properties([pipelineTriggers([[$class: 'GitHubPushTrigger']])]) // required to enable webhooks for a job
stage 'Build'
try {
sh 'ciscripts/triggerbuild.sh'
sh 'ciscripts/buildsuccess.sh'
} catch (err) {
currentBuild.results = 'FAILURE'
sh 'ciscripts/buildfailure.sh'
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'ciscripts/triggerbuild.sh'
}
}
}
post {
success {
sh 'ciscripts/buildsuccess.sh'
}
failure {
sh 'ciscripts/buildfailure.sh'
slackSend (color: '#961515', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
}

0 comments on commit ecd3847

Please sign in to comment.