// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md 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") } stage("Build Blackbox Tests") { shwrap(""" ./build_blackbox_tests mkdir -p tests/kola/blackbox/data/bin mv tests.test bin/amd64/* 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"]) // This is a temporary hack we use during spec stabilization to work around // external tests which use experimental versions. It should be commented // out in normal times. //if (shwrapRc("grep -nr 3.3.0-experimental /srv/fcos/src/config/tests/kola") == 0) { // shwrap("find /srv/fcos/src/config/tests/kola -type f -exec sed -i 's/3.3.0-experimental/3.3.0/' {} \\;") //} else { // throw new Exception("No 3.3.0-experimental external tests found; comment out this workaround.") //} // 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 // attention to it in the Jenkins UI fcosKola(extraArgs: "--denylist-test ext.*.blackbox") parallel blackbox: { unstash name: 'blackbox' fcosKola(extraArgs: "ext.*.blackbox", skipUpgrade: true) }, testiso: { shwrap(""" cd /srv/fcos cosa buildextend-metal cosa buildextend-metal4k cosa buildextend-live --fast """) fcosKolaTestIso(cosaDir: "/srv/fcos") } }