Skip to content

Instantly share code, notes, and snippets.

@g0t4
Last active February 25, 2022 14:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 21 You must be signed in to fork a gist
  • Save g0t4/fbae18da660f35fb1377505df347417d to your computer and use it in GitHub Desktop.
Save g0t4/fbae18da660f35fb1377505df347417d to your computer and use it in GitHub Desktop.
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>""",
)
}
@IstrateAndrei
Copy link

I'm getting this error when I'm trying to build the Module 5 starting point script:
/.jenkins/workspace/Solitare-JS@tmp/durable-12aed822/script.sh: line 1: npm: command not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment