| // -*- mode: groovy -*- |
| pipeline { |
| |
| agent { |
| kubernetes { |
| cloud 'kubernetes' |
| label 'example-v1' |
| containerTemplate { |
| name 'debian' |
| image 'buildpack-deps:stretch' |
| ttyEnabled true |
| command '/bin/cat' |
| } |
| } |
| } |
| |
| stages { |
| |
| stage('Prepare') { |
| steps { |
| container('debian') { |
| ansiColor('xterm') { |
| sh """ |
| apt-get update && apt-get install -y --no-install-recommends build-essential colormake |
| """ |
| } |
| } |
| } |
| } |
| |
| stage('Build') { |
| steps { |
| container('debian') { |
| ansiColor('xterm') { |
| sh """ |
| colormake -j4 |
| """ |
| } |
| } |
| } |
| } |
| |
| stage('Test') { |
| steps { |
| container('debian') { |
| ansiColor('xterm') { |
| sh """ |
| colormake test-junit -j4 |
| """ |
| junit '**/*.xml' |
| } |
| } |
| } |
| } |
| |
| stage('Archive artifacts') { |
| steps { |
| container('baker') { |
| archiveArtifacts 'build/unix/amd64/debug/bin/hello-world-ng' |
| } |
| } |
| } |
| |
| } |
| } |