Debian Codegraph @

.cci.jenkinsfile

raw
1 // Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
2
3 buildPod {
4 checkout scm
5
6 // hack to satisfy golang compiler wanting to cache things
7 shwrap("mkdir cache")
8 withEnv(["XDG_CACHE_HOME=${env.WORKSPACE}/cache"]) {
9 // XXX: convert all this to coreos-ci-lib sugar
10 stage("Build") {
11 shwrap("make")
12 shwrap("make install DESTDIR=install")
13 stash name: 'build', includes: 'install/**'
14 }
15 // first, run gofmt/govet/unit tests
16 stage("Unit Tests") {
17 shwrap("./test")
18 }
19 stage("Build Blackbox Tests") {
20 shwrap("""
21 ./build_blackbox_tests
22 mkdir -p tests/kola/blackbox/data/bin
23 mv tests.test bin/amd64/* tests/kola/blackbox/data/bin
24 """)
25 stash name: 'blackbox', includes: 'tests/kola/blackbox/data/bin/**'
26 }
27 }
28 }
29
30 cosaPod {
31 checkout scm
32
33 unstash name: 'build'
34 fcosBuild(skipKola: true, overlays: ["install"])
35
36 // This is a temporary hack we use during spec stabilization to work around
37 // external tests which use experimental versions. It should be commented
38 // out in normal times.
39 //if (shwrapRc("grep -nr 3.3.0-experimental /srv/fcos/src/config/tests/kola") == 0) {
40 // shwrap("find /srv/fcos/src/config/tests/kola -type f -exec sed -i 's/3.3.0-experimental/3.3.0/' {} \\;")
41 //} else {
42 // throw new Exception("No 3.3.0-experimental external tests found; comment out this workaround.")
43 //}
44
45 // we run the blackbox tests separately instead of as part of the main kola
46 // run since it's a distinct kind of test and we want to draw more
47 // attention to it in the Jenkins UI
48 fcosKola(extraArgs: "--denylist-test ext.*.blackbox")
49
50 parallel blackbox: {
51 unstash name: 'blackbox'
52 fcosKola(extraArgs: "ext.*.blackbox", skipUpgrade: true)
53 }, testiso: {
54 shwrap("""
55 cd /srv/fcos
56 cosa buildextend-metal
57 cosa buildextend-metal4k
58 cosa buildextend-live --fast
59 """)
60 fcosKolaTestIso(cosaDir: "/srv/fcos")
61 }
62 }