-
-
Save sayan1886/d8cb5f2c22d17618b2461aae13d10f2b to your computer and use it in GitHub Desktop.
This file contains 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
#!/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