Skip to content

Instantly share code, notes, and snippets.

@giehlman
Created October 24, 2017 09:54
Show Gist options
  • Save giehlman/827890f686b80b2e044f81a43eb5974b to your computer and use it in GitHub Desktop.
Save giehlman/827890f686b80b2e044f81a43eb5974b to your computer and use it in GitHub Desktop.
#!/usr/bin/env groovy
pipeline {
agent any
tools {nodejs "latest"}
stages {
stage('preflight') {
steps {
echo sh(returnStdout: true, script: 'env')
sh 'node -v'
}
}
stage('build') {
steps {
sh 'npm --version'
sh 'git log --reverse -1'
sh 'npm install'
}
}
stage('test') {
steps {
sh 'npm test'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment