rpm-ostree/ci/f29-cosa-build.sh
Colin Walters 1027ade4db ci: Just use cosa as a buildroot too
Since we have to pull it anyways to do a build, let's use it
as a buildroot.  This should fix CI which broke because we were
doing a f29 build but cosa is f30, and libostree differed.
2019-08-22 20:13:41 +00:00

32 lines
926 B
Bash
Executable File

#!/usr/bin/bash
# Build rpm-ostree, using cosa as a buildroot and then
# override the version inside cosa, then build FCOS
set -xeuo pipefail
cosaimg=quay.io/coreos-assembler/coreos-assembler:latest
podman pull "${cosaimg}"
# Build rpm-ostree using cosa as a buildroot, and extract the result
podman run --privileged --rm \
-v $(pwd):/srv/code -w /srv/code \
"${cosaimg}" \
/bin/sh -c './ci/build.sh && make install DESTDIR=$(pwd)/installroot'
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