blob: aa4980438358c8a184905dbefe8d0b480af5f249 [file] [log] [blame]
Matthias Andreas Benkard33147302018-04-09 21:22:22 +02001// -*- mode: groovy -*-
2pipeline {
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 Benkard4c712682018-04-10 20:54:36 +020036 colormake -j4
Matthias Andreas Benkard33147302018-04-09 21:22:22 +020037 """
38 }
39 }
40 }
41 }
42
Matthias Andreas Benkard4c712682018-04-10 20:54:36 +020043 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 Benkard33147302018-04-09 21:22:22 +020056 stage('Archive artifacts') {
57 steps {
58 container('baker') {
Matthias Andreas Benkard38610ae2018-04-10 20:39:24 +020059 archiveArtifacts 'exe/hello-world-ng'
Matthias Andreas Benkard33147302018-04-09 21:22:22 +020060 }
61 }
62 }
63
64 }
65}