forked from coreos/bootupd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cci.jenkinsfile
69 lines (67 loc) · 2.11 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
// Documentation: https://github.com/coreos/coreos-ci/blob/master/README-upstream-ci.md
stage("Build") {
parallel build: {
def n = 5
cosaPod(buildroot: true, runAsUser: 0, memory: "2Gi", cpu: "${n}") {
checkout scm
stage("Core build") {
shwrap("""
make -j ${n}
""")
}
stage("Unit tests") {
shwrap("""
cargo test
""")
}
shwrap("""
make install DESTDIR=\$(pwd)/insttree/
tar -c -C insttree/ -zvf insttree.tar.gz .
""")
stash includes: 'insttree.tar.gz', name: 'build'
}
},
codestyle: {
cosaPod(buildroot: true) {
checkout scm
shwrap("cargo fmt -- --check")
}
}
}
// Build FCOS and do a kola basic run
// FIXME update to main branch once https://github.com/coreos/fedora-coreos-config/pull/595 merges
cosaPod(buildroot: true, runAsUser: 0, memory: "3072Mi", cpu: "4") {
stage("Build FCOS") {
checkout scm
unstash 'build'
// Note that like {rpm-,}ostree we want to install to both / and overrides/rootfs
// because bootupd is used both during the `rpm-ostree compose tree` as well as
// inside the target operating system.
shwrap("""
mkdir insttree
tar -C insttree -xzvf insttree.tar.gz
rsync -rlv insttree/ /
coreos-assembler init --force https://github.com/coreos/fedora-coreos-config
mkdir -p overrides/rootfs
mv insttree/* overrides/rootfs/
rmdir insttree
cosa fetch
cosa build
""")
}
// The e2e-adopt test will use the ostree commit we just generated above
// but a static qemu base image.
stage("e2e adopt test") {
shwrap("env COSA_DIR=${env.WORKSPACE} ./tests/e2e-adopt/e2e-adopt.sh")
}
// Now a test that upgrades using bootupd
stage("e2e upgrade test") {
shwrap("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")
// bootupd really can't break upgrades for the OS
fcosKola(cosaDir: "${env.WORKSPACE}", extraArgs: "ext.*bootupd*", skipUpgrade: true)
}
}