-
-
Save sujeet-agrahari/8fc6e870276b5e34762ffd8f7eeab583 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
#!/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