Skip to content

Instantly share code, notes, and snippets.

@shreyakupadhyay
Created March 12, 2019 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shreyakupadhyay/bc47ea1dd040ba9f16238f597c3d609f to your computer and use it in GitHub Desktop.
Save shreyakupadhyay/bc47ea1dd040ba9f16238f597c3d609f to your computer and use it in GitHub Desktop.
Run multiple containers using Jenkins with declarative pipeline syntax
pipeline {
agent none
stages {
stage('unit-testing') {
agent {
docker { image 'node:8.15.1-jessie' }
}
steps {
sh 'node -v'
}
}
stage('pr-build') {
agent {
docker { image 'node:6.17.0-jessie' }
}
steps {
sh 'node --version'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment