Skip to content

Instantly share code, notes, and snippets.

@rajsahae
Created December 28, 2016 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajsahae/961350d0d4ea14b6b5246767ce2ab5af to your computer and use it in GitHub Desktop.
Save rajsahae/961350d0d4ea14b6b5246767ce2ab5af to your computer and use it in GitHub Desktop.
#!groovy
def jobs = [
tag_1 : { sh 'scripts/diagnostics.sh arg11 arg12 arg13' },
tag_2 : { sh 'scripts/diagnostics.sh arg21 arg22 arg23' },
tag_3 : { sh 'scripts/diagnostics.sh arg31 arg32 arg33' },
]
timestamps {
node('dockernode') {
stage('Build') {
checkout scm
sh 'scripts/setup.sh'
sh 'scripts/update-and-build.sh'
}
stage("Test") {
sh 'scripts/run-unit-tests.sh'
sh 'scripts/run-integration-tests.sh'
archiveArtifacts artifacts: '*.csv', excludes: null
}
stage("Diagnostics") {
parallel jobs
archiveArtifacts artifacts: '*.png,*.csv', excludes: null
}
sh 'scripts/cleanup.sh'
currentBuild.result = 'SUCCESS'
emailext attachmentsPattern: '*.png,*.csv', body: '''Build URL: $BUILD_URL
Status: $BUILD_STATUS''', subject: 'Job $BUILD_NUMBER Report', to: 'me@myself.com'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment