Skip to content

Commit

Permalink
ci: adapt to new buildroot image
Browse files Browse the repository at this point in the history
We're moving away from a buildroot image based on cosa, so we need to do
our build in a separate pod. This is more complex, but the upside is
that it guarantees that we're always building in the same buildroot that
was used to build all of FCOS' components.
  • Loading branch information
jlebon committed Mar 25, 2021
1 parent e3b3888 commit c781533
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
30 changes: 23 additions & 7 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
// Documentation: https://github.com/coreos/coreos-ci/blob/master/README-upstream-ci.md

cosaPod(buildroot: true) {
buildPod {
checkout scm

// hack to satisfy golang compiler wanting to cache things
shwrap("mkdir cache")
withEnv(["XDG_CACHE_HOME=${env.WORKSPACE}/cache"]) {
// XXX: convert all this to coreos-ci-lib sugar
stage("Build") {
shwrap("make")
shwrap("make install DESTDIR=install")
stash name: 'build', includes: 'install/**'
}
// first, run gofmt/govet/unit tests
stage("Unit Tests") {
shwrap("./test")
}
fcosBuild(make: true, skipKola: true)
stage("Build Blackbox Tests") {
shwrap("""
./build_blackbox_tests
mkdir -p tests/kola/blackbox/data/bin
mv tests.test bin/amd64/*-stub tests/kola/blackbox/data/bin
""")
stash name: 'blackbox', includes: 'tests/kola/blackbox/data/bin/**'
}
}
}

cosaPod {
checkout scm

unstash name: 'build'
fcosBuild(skipKola: true, overlays: ["install"])

// we run the blackbox tests separately instead of as part of the main kola
// run since it's a distinct kind of test and we want to draw more
Expand All @@ -21,11 +41,7 @@ cosaPod(buildroot: true) {
fcosKola(extraArgs: "--denylist-test ext.*")

parallel blackbox: {
shwrap("""
./build_blackbox_tests
mkdir -p tests/kola/blackbox/data
mv tests.test bin tests/kola/blackbox/data
""")
unstash name: 'blackbox'
fcosKola(extraArgs: "--tag external", skipUpgrade: true)
}, testiso: {
try {
Expand Down
4 changes: 2 additions & 2 deletions tests/kola/blackbox/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -euo pipefail

export PATH=${KOLA_EXT_DATA}/bin/amd64:$PATH
exec ${KOLA_EXT_DATA}/tests.test
export PATH=${KOLA_EXT_DATA}/bin:$PATH
exec ${KOLA_EXT_DATA}/bin/tests.test

0 comments on commit c781533

Please sign in to comment.