-
Notifications
You must be signed in to change notification settings - Fork 247
/
.cci.jenkinsfile
78 lines (70 loc) · 2.95 KB
/
.cci.jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
properties([
// abort previous runs when a PR is updated to save resources
disableConcurrentBuilds(abortPrevious: true)
])
buildPod {
checkout scm
// hack to satisfy golang compiler wanting to cache things
shwrap("mkdir cache")
withEnv(["XDG_CACHE_HOME=${env.WORKSPACE}/cache"]) {
// XXX: convert all this to coreos-ci-lib sugar
stage("Build") {
shwrap("make")
shwrap("make install DESTDIR=install")
stash name: 'build', includes: 'install/**'
}
// first, run gofmt/govet/unit tests
stage("Unit Tests") {
shwrap("./test")
}
stage("Build Blackbox Tests") {
shwrap("""
./build_blackbox_tests
mkdir -p tests/kola/blackbox/data/bin
mv tests.test bin/amd64/* tests/kola/blackbox/data/bin
""")
stash name: 'blackbox', includes: 'tests/kola/blackbox/data/bin/**'
}
}
}
cosaPod {
checkout scm
unstash name: 'build'
cosaBuild(skipKola: true, overlays: ["install"])
// This is a temporary hack we use during spec stabilization to work around
// external tests which use experimental versions. It should be commented
// out in normal times.
//if (shwrapRc("grep -nr 3.3.0-experimental /srv/coreos/src/config/tests/kola") == 0) {
// shwrap("find /srv/coreos/src/config/tests/kola -type f -exec sed -i 's/3.3.0-experimental/3.3.0/' {} \\;")
//} else {
// throw new Exception("No 3.3.0-experimental external tests found; comment out this workaround.")
//}
// Similarly, external tests might use Butane experimental specs which
// transpile to Ignition experimental specs. Uncomment this to work
// around the problem, and re-comment it afterward. If kola sees a
// non-experimental spec it doesn't recognize, it'll automatically add
// -experimental and then strip -experimental from the resulting
// Ignition config.
//if (shwrapRc("grep -nr 1.6.0-experimental /srv/coreos/src/config/tests/kola") == 0) {
// shwrap("find /srv/coreos/src/config/tests/kola -type f -exec sed -i 's/1.6.0-experimental/1.6.0/' {} \\;")
//} else {
// throw new Exception("No 1.6.0-experimental external tests found; comment out this workaround.")
//}
// we run the blackbox tests separately instead of as part of the main kola
// run since it's a distinct kind of test and we want to draw more
// attention to it in the Jenkins UI
kola(extraArgs: "--denylist-test ext.*.blackbox")
parallel blackbox: {
unstash name: 'blackbox'
kola(extraArgs: "ext.*.blackbox", skipUpgrade: true)
}, testiso: {
shwrap("""
cd /srv/coreos
cosa buildextend-metal
cosa buildextend-metal4k
cosa buildextend-live --fast
""")
kolaTestIso()
}
}