Skip to content

Instantly share code, notes, and snippets.

@mosluce
Created July 5, 2017 10:17
Show Gist options
  • Select an option

  • Save mosluce/e21875b99bb2e8f139f95dee9e025e4e to your computer and use it in GitHub Desktop.

Select an option

Save mosluce/e21875b99bb2e8f139f95dee9e025e4e to your computer and use it in GitHub Desktop.
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