Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 1 | // -*- mode: groovy -*- |
| 2 | pipeline { |
| 3 | |
| 4 | agent { |
| 5 | kubernetes { |
| 6 | cloud 'kubernetes' |
| 7 | label 'example-v1' |
| 8 | containerTemplate { |
| 9 | name 'debian' |
| 10 | image 'buildpack-deps:stretch' |
| 11 | ttyEnabled true |
| 12 | command '/bin/cat' |
| 13 | } |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | stages { |
| 18 | |
| 19 | stage('Prepare') { |
| 20 | steps { |
| 21 | container('debian') { |
| 22 | ansiColor('xterm') { |
| 23 | sh """ |
| 24 | apt-get update && apt-get install -y --no-install-recommends build-essential colormake |
| 25 | """ |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | stage('Build') { |
| 32 | steps { |
| 33 | container('debian') { |
| 34 | ansiColor('xterm') { |
| 35 | sh """ |
Matthias Andreas Benkard | 4c71268 | 2018-04-10 20:54:36 +0200 | [diff] [blame] | 36 | colormake -j4 |
Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 37 | """ |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | |
Matthias Andreas Benkard | 4c71268 | 2018-04-10 20:54:36 +0200 | [diff] [blame] | 43 | stage('Test') { |
| 44 | steps { |
| 45 | container('debian') { |
| 46 | ansiColor('xterm') { |
| 47 | sh """ |
| 48 | colormake test-junit -j4 |
| 49 | """ |
| 50 | junit 'test-results/**/*.xml' |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 56 | stage('Archive artifacts') { |
| 57 | steps { |
| 58 | container('baker') { |
Matthias Andreas Benkard | 38610ae | 2018-04-10 20:39:24 +0200 | [diff] [blame] | 59 | archiveArtifacts 'exe/hello-world-ng' |
Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | } |
| 65 | } |