ci: Add a f29 FCOS build

Let's start doing testing using coreos-assembler + Fedora CoreOS.

Closes: #1774
Approved by: jlebon
This commit is contained in:
Colin Walters 2019-03-07 03:23:52 +00:00 committed by Atomic Bot
parent b851d9dad2
commit b63f3720b8
2 changed files with 47 additions and 0 deletions

View File

@ -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

29
ci/f29-cosa-build.sh Executable file
View File

@ -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