mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
87cf46bbd9
This triggers the new git warning; I think this is only here because long ago we used coreos-assembler as a buildroot, but that's long since fixed.
122 lines
3.6 KiB
Plaintext
122 lines
3.6 KiB
Plaintext
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
|
|
|
|
stage("Build") {
|
|
parallel normal: {
|
|
def n = 5
|
|
buildPod(memory: "2Gi", cpu: "${n}") {
|
|
checkout scm
|
|
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
|
|
""")
|
|
}
|
|
stash includes: "installed/", name: 'build'
|
|
}
|
|
},
|
|
// A minimal build, helps test our build options
|
|
minimal: {
|
|
buildPod() {
|
|
checkout scm
|
|
shwrap("""
|
|
git submodule update --init
|
|
|
|
env NOCONFIGURE=1 ./autogen.sh
|
|
./configure --without-curl --without-soup --disable-gtk-doc --disable-man \
|
|
--disable-rust --without-libarchive --without-selinux --without-smack \
|
|
--without-openssl --without-avahi --without-libmount --disable-rofiles-fuse \
|
|
--without-libsodium
|
|
make
|
|
""")
|
|
}
|
|
},
|
|
codestyle: {
|
|
buildPod() {
|
|
checkout scm
|
|
shwrap("""
|
|
# Jenkins by default only fetches the branch it's testing. Explicitly fetch main
|
|
# for ci-commitmessage-submodules.sh
|
|
git fetch origin +refs/heads/main:refs/remotes/origin/main
|
|
ci/ci-commitmessage-submodules.sh
|
|
""")
|
|
}
|
|
}
|
|
}
|
|
|
|
// Build FCOS and do a kola basic run
|
|
stage("More builds and test") {
|
|
parallel fcos: {
|
|
cosaPod(runAsUser: 0, memory: "3072Mi", cpu: "4") {
|
|
stage("Build FCOS") {
|
|
checkout scm
|
|
unstash 'build'
|
|
shwrap("""
|
|
# Move the bits into the cosa pod
|
|
rsync -rlv installed/rootfs/ /
|
|
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
|
|
|
|
""")
|
|
}
|
|
stage("Test") {
|
|
parallel metal: {
|
|
try {
|
|
shwrap("kola testiso -S --scenarios pxe-install,iso-offline-install,pxe-offline-install --output-dir tmp/kola-testiso-metal")
|
|
} finally {
|
|
shwrap("tar -cf - tmp/kola-testiso-metal/ | xz -c9 > ${env.WORKSPACE}/kola-testiso-metal.tar.xz")
|
|
archiveArtifacts allowEmptyArchive: true, artifacts: 'kola-testiso*.tar.xz'
|
|
}
|
|
}, kola: {
|
|
fcosKola(cosaDir: "${env.WORKSPACE}")
|
|
}
|
|
}
|
|
}
|
|
},
|
|
buildopts: {
|
|
def n = 5
|
|
buildPod(memory: "2Gi", cpu: "${n}") {
|
|
checkout scm
|
|
shwrap("""
|
|
git submodule update --init
|
|
|
|
git worktree add build-libsoup && cd build-libsoup
|
|
env MAKE_JOBS=${n} CONFIGOPTS="--without-curl --without-openssl --with-soup" SKIP_INSTALLDEPS=1 ./ci/build.sh
|
|
make check
|
|
cd .. && rm -rf build-libsoup
|
|
""")
|
|
}
|
|
}
|
|
}
|