// -*- 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 'test-results/**/*.xml' | |
} | |
} | |
} | |
} | |
stage('Archive artifacts') { | |
steps { | |
container('baker') { | |
archiveArtifacts 'exe/hello-world-ng' | |
} | |
} | |
} | |
} | |
} |