forked from coreos/coreos-assembler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cci.jenkinsfile
68 lines (53 loc) · 2.24 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
// 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)
])
// Build coreos-assembler image and create
// an imageStream for it
def cpuCount = 6
def cpuCount_s = cpuCount.toString()
def imageName = buildImage(env: [ENABLE_GO_RACE_DETECTOR: "1", GOMAXPROCS: cpuCount_s], cpu: cpuCount_s)
def memory = (cpuCount * 1536) as Integer
pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memory}Mi") {
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)
cosaBuild(skipKola: 1, cosaDir: "/srv", noForce: true)
// Run stage Kola QEMU (basic-qemu-scenarios, upgrade and self tests)
kola(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")
}
kolaTestIso(cosaDir: "/srv")
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
${env.WORKSPACE}/tests/test_pruning.sh
""")
}
}