mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 06:45:13 +01:00
So far we've supported updating systems that we installed, but we also need to handle updating at least older CoreOS systems. This shares a lot of similarity with `update`; the biggest difference is that we aren't sure which files we should be managing. So given a pending update, we only replace files that exist in that update. Closes: https://github.com/coreos/bootupd/issues/38
70 lines
2.1 KiB
Plaintext
70 lines
2.1 KiB
Plaintext
// 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)
|
|
}
|
|
}
|