289af613a9
Jenkins is tricky: it does an initial checkout, merges the PR head into the target branch, then creates the pod. Once in the pod, we do a `checkout scm` which *also* merges the PR head into the target branch. However, the `change.GIT_COMMIT` variable we get from that is set to the SHA of the first merge, not the second one. Which... yeah is super confusing since we explicitly assign `change` from that `checkout scm` operation. So that's probably a valid bug. This was then throwing off `ci-commitmessage-submodules.sh` since it didn't find the merge commit in the graph. Anyway, not going to spend more time on this. Let's just not pass any commit at all. The git range `origin/master..HEAD` already does what we want (go through all the commits in HEAD *not* in master).
106 lines
3.0 KiB
Plaintext
106 lines
3.0 KiB
Plaintext
@Library('github.com/coreos/coreos-ci-lib@master') _
|
|
|
|
stage("Build") {
|
|
parallel rpms: {
|
|
coreos.pod(image: 'registry.svc.ci.openshift.org/coreos/cosa-buildroot:latest', runAsUser: 0) {
|
|
checkout scm
|
|
sh """
|
|
set -euo pipefail
|
|
ci/installdeps.sh
|
|
git submodule update --init
|
|
|
|
# We lose sanitizers (all the *san) here by building straight to RPMs, but we can
|
|
# restore those through a build opt later on. Being able to stash RPMs directly is
|
|
# super nice (and archiving later on will make it easy for anyone to download
|
|
# binaries from PRs in the future) and meshes well with the following stages.
|
|
export PATH="/root/.cargo/bin:\$PATH"
|
|
cargo install cbindgen
|
|
cbindgen -c rust/cbindgen.toml -o rpmostree-rust.h rust
|
|
|
|
cd packaging
|
|
make -f Makefile.dist-packaging rpm
|
|
"""
|
|
stash includes: 'packaging/**/*.rpm', name: 'rpms'
|
|
}
|
|
},
|
|
codestyle: {
|
|
coreos.pod(image: 'quay.io/coreos-assembler/coreos-assembler:latest') {
|
|
checkout scm
|
|
sh """
|
|
set -euo pipefail
|
|
# Jenkins by default only fetches the branch it's testing. Explicitly fetch master
|
|
# for ci-commitmessage-submodules.sh
|
|
git fetch origin +refs/heads/master:refs/remotes/origin/master
|
|
ci/ci-commitmessage-submodules.sh
|
|
ci/codestyle.sh
|
|
"""
|
|
}
|
|
},
|
|
msrv: {
|
|
coreos.pod(image: 'registry.svc.ci.openshift.org/coreos/cosa-buildroot:latest', runAsUser: 0) {
|
|
checkout scm
|
|
|
|
sh """
|
|
set -euo pipefail
|
|
ci/msrv.sh
|
|
"""
|
|
}
|
|
}}
|
|
|
|
stage("Build FCOS") {
|
|
coreos.pod(image: 'quay.io/coreos-assembler/coreos-assembler:latest', runAsUser: 0, kvm: true) {
|
|
unstash 'rpms'
|
|
sh """
|
|
set -euo pipefail
|
|
|
|
# install our built rpm-ostree
|
|
find packaging/ ! -name '*.src.rpm' -name '*.rpm' | xargs dnf install -y
|
|
rm -rf packaging
|
|
|
|
# and build FCOS
|
|
coreos-assembler init --force https://github.com/coreos/fedora-coreos-config
|
|
coreos-assembler build
|
|
"""
|
|
stash includes: 'builds/latest/*/*.qcow2', name: 'fcos'
|
|
}
|
|
}
|
|
|
|
/*
|
|
stage("Test") {
|
|
parallel vmcheck: {
|
|
coreos.pod(image: 'quay.io/coreos-assembler/coreos-assembler:latest', runAsUser: 0, kvm: true) {
|
|
checkout scm
|
|
unstash 'rpms'
|
|
sh """
|
|
set -euo pipefail
|
|
|
|
# install our built rpm-ostree
|
|
find packaging/ ! -name '*.src.rpm' -name '*.rpm' | xargs dnf install -y
|
|
rm -rf packaging
|
|
"""
|
|
unstash 'fcos'
|
|
sh """
|
|
set -euo pipefail
|
|
|
|
echo "standing up VMs"
|
|
find builds/ -name '*.qcow2'
|
|
"""
|
|
}
|
|
},
|
|
compose: {
|
|
coreos.pod(image: 'quay.io/coreos-assembler/coreos-assembler:latest', runAsUser: 0, kvm: true) {
|
|
checkout scm
|
|
unstash 'rpms'
|
|
sh """
|
|
set -euo pipefail
|
|
|
|
# install our built rpm-ostree
|
|
find packaging/ ! -name '*.src.rpm' -name '*.rpm' | xargs dnf install -y
|
|
rm -rf packaging
|
|
|
|
echo "starting compose tests in supermin"
|
|
"""
|
|
}
|
|
}}
|
|
*/
|