Forked from g0t4/solitaire-pipeline-starting-point.groovy
Created
January 25, 2017 05:03
-
-
Save josemarjobs/64fdecf1a3cca829d10f8be04ce83efb 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
| stage 'CI' | |
| node { | |
| git branch: 'jenkins2-course', | |
| url: 'https://github.com/g0t4/solitaire-systemjs-course' | |
| // pull dependencies from npm | |
| // on windows use: bat 'npm install' | |
| sh 'npm install' | |
| // stash code & dependencies to expedite subsequent testing | |
| // and ensure same code & dependencies are used throughout the pipeline | |
| // stash is a temporary archive | |
| stash name: 'everything', | |
| excludes: 'test-results/**', | |
| includes: '**' | |
| // test with PhantomJS for "fast" "generic" results | |
| // on windows use: bat 'npm run test-single-run -- --browsers PhantomJS' | |
| sh 'npm run test-single-run -- --browsers PhantomJS' | |
| // archive karma test results (karma is configured to export junit xml files) | |
| step([$class: 'JUnitResultArchiver', | |
| testResults: 'test-results/**/test-results.xml']) | |
| } | |
| def notify(status){ | |
| emailext ( | |
| to: "wesmdemos@gmail.com", | |
| subject: "${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'", | |
| body: """<p>${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p> | |
| <p>Check console output at <a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a></p>""", | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment