diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..eae2fec0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.cosa +target diff --git a/ci/prow/Dockerfile b/ci/prow/Dockerfile index 8ba6d4ee..18cf0c6b 100644 --- a/ci/prow/Dockerfile +++ b/ci/prow/Dockerfile @@ -1,12 +1,19 @@ -FROM registry.svc.ci.openshift.org/coreos/cosa-buildroot:latest as builder +FROM registry.ci.openshift.org/coreos/cosa-buildroot:latest as builder WORKDIR /src COPY . . RUN ./ci/build.sh && make install DESTDIR=/cosa/component-install +RUN make -C tests/kolainst install DESTDIR=/cosa/component-tests # Uncomment this to fake a build to test the code below # RUN mkdir -p /cosa/component-install/usr/bin && echo foo > /cosa/component-install/usr/bin/foo -FROM registry.svc.ci.openshift.org/coreos/coreos-assembler:latest +FROM registry.ci.openshift.org/coreos/coreos-assembler:latest WORKDIR /srv -# Install our built binaries as overrides for the target build -COPY --from=builder /cosa/component-install /srv/overrides/rootfs/ +USER root +# Copy binaries from the build +COPY --from=builder /cosa /cosa +# Merge them to the real root since we're used at compose time +RUN rsync -rlv /cosa/component-install/ / +# Merge installed tests +RUN rsync -rlv /cosa/component-tests/ / COPY --from=builder /src/ci/prow/fcos-e2e.sh /usr/bin/fcos-e2e +USER builder diff --git a/ci/prow/fcos-e2e.sh b/ci/prow/fcos-e2e.sh index f0b1dc01..6365ad84 100755 --- a/ci/prow/fcos-e2e.sh +++ b/ci/prow/fcos-e2e.sh @@ -3,9 +3,13 @@ set -xeuo pipefail # Prow jobs don't support adding emptydir today export COSA_SKIP_OVERLAY=1 -gitdir=$(pwd) +# And suppress depcheck since we didn't install via RPM +export COSA_SUPPRESS_DEPCHECK=1 +ls -al /usr/bin/rpm-ostree +rpm-ostree --version cd $(mktemp -d) -cosa init --force https://github.com/coreos/fedora-coreos-config/ +cosa init https://github.com/coreos/fedora-coreos-config/ +rsync -rlv /cosa/component-install/ overrides/rootfs/ cosa fetch cosa build -cosa kola run 'ext.*' +cosa kola run 'ext.rpm-ostree.*' diff --git a/tests/kolainst/kolainst-build.sh b/tests/kolainst/kolainst-build.sh index 5f073c5b..d4d8ec76 100755 --- a/tests/kolainst/kolainst-build.sh +++ b/tests/kolainst/kolainst-build.sh @@ -3,7 +3,7 @@ # to the kola tests as data/, so we don't need to rpmbuild. set -euo pipefail dn=$(cd "$(dirname "$0")" && pwd) -topsrcdir=$(git rev-parse --show-toplevel) +topsrcdir=$(cd $dn/../.. && pwd) commondir=$(cd "$dn/../common" && pwd) export topsrcdir commondir . "${commondir}/libtest.sh"