From b63f3720b8860f69fe4f264e82a15731a1ad873d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 7 Mar 2019 03:23:52 +0000 Subject: [PATCH] ci: Add a f29 FCOS build Let's start doing testing using coreos-assembler + Fedora CoreOS. Closes: #1774 Approved by: jlebon --- .papr.yml | 18 ++++++++++++++++++ ci/f29-cosa-build.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100755 ci/f29-cosa-build.sh diff --git a/.papr.yml b/.papr.yml index 2d8a16a0..0a0c4cfc 100644 --- a/.papr.yml +++ b/.papr.yml @@ -15,6 +15,24 @@ tests: --- +# Build a Fedora CoreOS ostree +context: fcos29-cosa-build +inherit: true + +# This test case wants unprivileged recursive containers +# which we don't have right now; so just provision a VM and do a +# docker --privileged run. +# https://github.com/openshift/origin/issues/21514 +host: + distro: fedora/29/atomic + +tests: + - ./ci/f29-cosa-build.sh + +timeout: 60m + +--- + context: f28-primary inherit: true diff --git a/ci/f29-cosa-build.sh b/ci/f29-cosa-build.sh new file mode 100755 index 00000000..b787bb54 --- /dev/null +++ b/ci/f29-cosa-build.sh @@ -0,0 +1,29 @@ +#!/usr/bin/bash +# Build rpm-ostree, then inject it into a cosa container and build FCOS +set -xeuo pipefail + +podman run --privileged --rm \ + -v $(pwd):/srv/code -w /srv/code \ + registry.fedoraproject.org/fedora:29 \ + /bin/sh -c './ci/build.sh && make install DESTDIR=$(pwd)/installroot' + +cosaimg=quay.io/coreos-assembler/coreos-assembler:latest +podman pull "${cosaimg}" + +codedir=$(pwd) +mkdir fcos +cd fcos +cat >script.sh <<'EOF' +#!/usr/bin/bash +set -xeuo pipefail +# Overlay the built binaries +rsync -rlv /code/installroot/usr/ /usr/ +coreos-assembler init --force https://github.com/coreos/fedora-coreos-config +coreos-assembler build ostree +EOF +chmod a+x script.sh +podman run --privileged --rm -ti \ + -v ${codedir}:/code -v $(pwd):/srv -w /srv \ + --entrypoint bash \ + --privileged ${cosaimg} \ + ./script.sh