forked from coreos/coreos-assembler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cci.jenkinsfile
59 lines (54 loc) · 1.99 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
// Documentation: https://github.com/coreos/coreos-ci/blob/master/README-upstream-ci.md
pod(image: 'registry.fedoraproject.org/fedora:31', runAsUser: 0, kvm: true, memory: "9Gi") {
checkout scm
stage("Build") {
shwrap("""
dnf install -y git
git submodule update --init
./build.sh
""")
}
stage("Test") {
parallel check: {
shwrap("""
make check
make unittest
""")
},
build: {
shwrap("chown builder: /srv")
// just split into separate invocations to make it easier to see where it fails
cosa_cmd("init https://github.com/coreos/fedora-coreos-config")
cosa_cmd("fetch")
cosa_cmd("build")
}
parallel kola: {
try {
cosa_cmd("kola --basic-qemu-scenarios")
cosa_cmd("kola run --parallel 8")
cosa_cmd("kola --upgrades")
} finally {
shwrap("cd /srv && tar -cf - tmp/kola/ | xz -c9 > ${env.WORKSPACE}/kola.tar.xz")
archiveArtifacts allowEmptyArchive: true, artifacts: 'kola.tar.xz'
}
// sanity check kola actually ran and dumped its output in tmp/
shwrap("test -d /srv/tmp/kola")
},
buildextend: {
cosa_cmd("buildextend-metal")
cosa_cmd("buildextend-live")
cosa_cmd("buildextend-openstack")
cosa_cmd("buildextend-vmware")
cosa_cmd("compress")
// quick schema validation"
cosa_cmd("meta --get name")
cosa_cmd("buildupload --dry-run s3 --acl=public-read my-nonexistent-bucket/my/prefix")
}
}
stage("CLI Tests") {
shwrap("cd /srv && sudo -u builder ${env.WORKSPACE}/tests/test_pruning.sh")
}
}
def cosa_cmd(args) {
shwrap("cd /srv && sudo -u builder cosa ${args}")
}