Last active
October 10, 2017 09:44
-
-
Save michaelneale/29aa81ee3617b17c540bcd20fe7a21d4 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
| pipeline { | |
| agent { | |
| docker { | |
| image 'node:6-alpine' | |
| args '-p 3000:3000' | |
| } | |
| } | |
| environment { | |
| CI = 'true' | |
| } | |
| stages { | |
| stage('Build') { | |
| steps { | |
| sh 'npm install' | |
| } | |
| } | |
| stage('Test') { | |
| steps { | |
| sh 'npm test' | |
| } | |
| } | |
| stage('Deliver') { | |
| steps { | |
| sh 'npm run build' | |
| sh ''' | |
| npm start & | |
| echo $! > .pidfile | |
| ''' | |
| input message:'Finished visiting the web site?' | |
| sh 'kill $(cat .pidfile)' | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment