forked from coreos/coreos-assembler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cci.jenkinsfile
60 lines (46 loc) · 2 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
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
// Build coreos-assembler image and create
// an imageStream for it
def imageName = buildImage(env: [ENABLE_GO_RACE_DETECTOR: "1"])
pod(image: imageName + ":latest", kvm: true, memory: "10Gi") {
checkout scm
stage("Unit tests") {
shwrap("make check")
shwrap("make unittest")
}
shwrap("rpm -qa | sort > rpmdb.txt")
archiveArtifacts artifacts: 'rpmdb.txt'
// Run stage Build FCOS (init, fetch and build)
fcosBuild(skipKola: 1, cosaDir: "/srv", noForce: true)
// Run stage Kola QEMU (basic-qemu-scenarios, upgrade and self tests)
fcosKola(cosaDir: "/srv", addExtTests: ["${env.WORKSPACE}/ci/run-kola-self-tests"])
stage("Build Metal") {
cosaParallelCmds(cosaDir: "/srv", commands: ["metal", "metal4k"])
}
stage("Build Live Images") {
// Explicitly test re-importing the ostree repo
shwrap("cd /srv && rm tmp/repo -rf")
utils.cosaCmd(cosaDir: "/srv", args: "buildextend-live --fast")
}
fcosKolaTestIso(cosaDir: "/srv", extraArgs4k: "--no-pxe")
stage("Build Cloud Images") {
cosaParallelCmds(cosaDir: "/srv", commands: ["Aliyun", "AWS", "Azure", "DigitalOcean", "Exoscale", "GCP",
"IBMCloud", "OpenStack", "VMware", "Vultr"])
// quick schema validation
utils.cosaCmd(cosaDir: "/srv", args: "meta --get name")
}
stage("Compress") {
utils.cosaCmd(cosaDir: "/srv", args: "compress --fast")
}
stage("Upload Dry Run") {
utils.cosaCmd(cosaDir: "/srv", args: "buildupload --dry-run s3 --acl=public-read my-nonexistent-bucket/my/prefix")
}
// Random other tests that aren't about building. XXX: These should be part of `make
// check` or something and use dummy cosa builds.
stage("CLI Tests") {
shwrap("""
cd /srv
sudo -u builder ${env.WORKSPACE}/tests/test_pruning.sh
""")
}
}