Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Created May 11, 2018 13:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vfarcic/2cf872c3a9acac51409fbd5a2789cb02 to your computer and use it in GitHub Desktop.
Save vfarcic/2cf872c3a9acac51409fbd5a2789cb02 to your computer and use it in GitHub Desktop.
podTemplate(
label: 'kubernetes',
containers: [
containerTemplate(name: 'maven', image: 'maven:alpine', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'golang', image: 'golang:alpine', ttyEnabled: true, command: 'cat')
]
) {
node('kubernetes') {
container('maven') {
stage('build') {
sh 'mvn --version'
}
stage('unit-test') {
sh 'java -version'
}
}
container('golang') {
stage('deploy') {
sh 'go version'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment