ci/prow: Install in target cosa, also install and run our tests
This is a major downside of reworking and generating new CI flows, it's super easy to lose testing what you intend to. Also, we clearly need to figure out a flow where this is shared across repos, since I don't want to copy-paste this into e.g. ostree too. That's https://github.com/coreos/fedora-coreos-tracker/issues/263
This commit is contained in:
parent
b02987a22e
commit
1dc7503838
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.cosa
|
||||||
|
target
|
@ -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
|
WORKDIR /src
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN ./ci/build.sh && make install DESTDIR=/cosa/component-install
|
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
|
# 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
|
# 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
|
WORKDIR /srv
|
||||||
# Install our built binaries as overrides for the target build
|
USER root
|
||||||
COPY --from=builder /cosa/component-install /srv/overrides/rootfs/
|
# 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
|
COPY --from=builder /src/ci/prow/fcos-e2e.sh /usr/bin/fcos-e2e
|
||||||
|
USER builder
|
||||||
|
@ -3,9 +3,13 @@ set -xeuo pipefail
|
|||||||
|
|
||||||
# Prow jobs don't support adding emptydir today
|
# Prow jobs don't support adding emptydir today
|
||||||
export COSA_SKIP_OVERLAY=1
|
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)
|
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 fetch
|
||||||
cosa build
|
cosa build
|
||||||
cosa kola run 'ext.*'
|
cosa kola run 'ext.rpm-ostree.*'
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# to the kola tests as data/, so we don't need to rpmbuild.
|
# to the kola tests as data/, so we don't need to rpmbuild.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
dn=$(cd "$(dirname "$0")" && pwd)
|
dn=$(cd "$(dirname "$0")" && pwd)
|
||||||
topsrcdir=$(git rev-parse --show-toplevel)
|
topsrcdir=$(cd $dn/../.. && pwd)
|
||||||
commondir=$(cd "$dn/../common" && pwd)
|
commondir=$(cd "$dn/../common" && pwd)
|
||||||
export topsrcdir commondir
|
export topsrcdir commondir
|
||||||
. "${commondir}/libtest.sh"
|
. "${commondir}/libtest.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user