Created
December 28, 2016 07:47
-
-
Save rajsahae/961350d0d4ea14b6b5246767ce2ab5af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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: '[email protected]' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment