-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy path.cci.jenkinsfile
More file actions
75 lines (72 loc) · 2.18 KB
/
.cci.jenkinsfile
File metadata and controls
75 lines (72 loc) · 2.18 KB
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
// 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)
])
stage("Build") {
parallel build: {
def n = 5
buildPod(runAsUser: 0, memory: "2Gi", cpu: "${n}") {
checkout scm
stage("Core build") {
shwrap("""
make -j ${n}
""")
}
stage("Unit tests") {
shwrap("""
dnf install -y grub2-tools-minimal
cargo test --features rpm
cargo test
""")
}
shwrap("""
make install-all DESTDIR=\$(pwd)/insttree/
tar -c -C insttree/ -zvf insttree.tar.gz .
""")
stash includes: 'insttree.tar.gz', name: 'build'
}
},
codestyle: {
buildPod {
checkout scm
shwrap("cargo fmt -- --check")
}
}
}
// Build FCOS and do a kola basic run
// The FCOS build process is memory-intensive; 7GiB is needed to prevent OOM errors.
cosaPod(memory: "7168Mi", cpu: "4") {
stage("Build FCOS") {
checkout scm
unstash 'build'
// Install the built bootupd into the overrides dir
shwrap("""
coreos-assembler init --force https://github.com/coreos/fedora-coreos-config
mkdir -p overrides/rootfs
tar -C overrides/rootfs -xzvf insttree.tar.gz
rm insttree.tar.gz
cosa build
cosa osbuild qemu metal4k
""")
}
// The e2e-adopt test will use the ostree commit we just generated above
// but a static qemu base image.
try {
// Now a test that upgrades using bootupd
stage("e2e upgrade test") {
shwrap("""
git config --global --add safe.directory "\$(pwd)"
env COSA_DIR=${env.WORKSPACE} ./tests/e2e-update/e2e-update.sh
""")
}
stage("Kola testing") {
// The previous e2e leaves things only having built an ostree update
shwrap("cosa build && cosa osbuild qemu")
// bootupd really can't break upgrades for the OS
kola(cosaDir: "${env.WORKSPACE}", extraArgs: "ext.*bootupd* --qemu-firmware=uefi", skipUpgrade: true, skipBasicScenarios: true)
}
} finally {
archiveArtifacts allowEmptyArchive: true, artifacts: 'tmp/console.txt'
}
}