Created
July 5, 2017 10:17
-
-
Save mosluce/e21875b99bb2e8f139f95dee9e025e4e 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:8.1.0' | |
| args '-u root' | |
| } | |
| } | |
| stages { | |
| stage('Clean') { | |
| steps { | |
| echo 'cleaning...' | |
| sh 'rm -rf app' | |
| } | |
| } | |
| stage('Build') { | |
| steps { | |
| echo 'building...' | |
| sh 'git clone https://github.com/mosluce/ci-sample.git app' | |
| sh 'npm i -g yarn' | |
| sh 'cd app && ls -al && yarn install' | |
| } | |
| } | |
| stage('Test') { | |
| steps { | |
| echo 'testing...' | |
| sh 'cd app && npm test' | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment