mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-25 01:34:34 +03:00
90ffc149cb
The `skipMetal4k` and `skipMultipath` parameters no longer do anything. Instead use `--denylist-test` which is interpreted directly by the new `kola testiso` code. This will run more tests than before. We'll likely cut down tests we consider redundant soon, but that should be transparent to this code.
74 lines
2.3 KiB
Plaintext
74 lines
2.3 KiB
Plaintext
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
|
|
|
|
stage("Build") {
|
|
def n = 5
|
|
buildPod(memory: "2Gi", cpu: "${n}") {
|
|
checkout scm
|
|
stage("Static analysis") {
|
|
shwrap("./ci/codestyle.sh")
|
|
}
|
|
stage("Core build") {
|
|
shwrap("""
|
|
# fetch tags so `git describe` gives a nice NEVRA when building the RPM
|
|
git fetch origin --tags
|
|
git submodule update --init
|
|
|
|
env MAKE_JOBS=${n} SKIP_INSTALLDEPS=1 ./ci/build.sh
|
|
""")
|
|
}
|
|
stage("Unit tests") {
|
|
try {
|
|
shwrap("""
|
|
make check
|
|
make syntax-check
|
|
""")
|
|
} finally {
|
|
shwrap("cat test-suite.log || true")
|
|
archiveArtifacts allowEmptyArchive: true, artifacts: 'test-suite.log'
|
|
}
|
|
}
|
|
stage("Build installed tests") {
|
|
shwrap("make -C tests/kolainst")
|
|
}
|
|
stage("Generate artifacts") {
|
|
shwrap("""
|
|
make install DESTDIR=\$(pwd)/installed/rootfs
|
|
make -C tests/kolainst install DESTDIR=\$(pwd)/installed/tests
|
|
bash -c '. /usr/lib/os-release && echo \$VERSION_ID' >\$(pwd)/installed/buildroot-id
|
|
""")
|
|
}
|
|
stash includes: "installed/", name: 'build'
|
|
}
|
|
}
|
|
|
|
// Build FCOS and run kola tests.
|
|
// There's some parallelization in testiso up to 8G, add 1G for overhead
|
|
cosaPod(runAsUser: 0, memory: "9Gi", cpu: "4") {
|
|
stage("Build FCOS") {
|
|
checkout scm
|
|
unstash 'build'
|
|
shwrap("""
|
|
# Move the bits into the cosa pod (but only if major versions match)
|
|
buildroot_id=\$(cat installed/buildroot-id)
|
|
osver=\$(. /usr/lib/os-release && echo \$VERSION_ID)
|
|
if test \$osver = \$buildroot_id; then
|
|
rsync -rlv installed/rootfs/ /
|
|
fi
|
|
rsync -rlv installed/tests/ /
|
|
coreos-assembler init --force https://github.com/coreos/fedora-coreos-config
|
|
mkdir -p overrides/rootfs
|
|
# And override the on-host bits
|
|
mv installed/rootfs/* overrides/rootfs/
|
|
rm installed -rf
|
|
coreos-assembler fetch
|
|
coreos-assembler build
|
|
coreos-assembler buildextend-metal
|
|
coreos-assembler buildextend-metal4k
|
|
coreos-assembler buildextend-live --fast
|
|
|
|
""")
|
|
}
|
|
kola(cosaDir: "${env.WORKSPACE}")
|
|
kolaTestIso(cosaDir: "${env.WORKSPACE}", extraArgs: "--denylist-test *.4k.* --denylist-test *.mpath.*")
|
|
}
|