Skip to content

Commit b753cc7

Browse files
committed
exttests: New container image with upstream tests
This is aiming to finally, finally close the loop around running upstream tests as part of our CI. We landed support for "exttests" in here for a while and since then we are successfully running upstream test suites using kola on upstream pull requests. But we also want the inverse: run upstream tests on builds outside of PRs to those repos. For example, I really want to run ostree's "transactionality" test on FCOS builds so that if a kernel change breaks it, we know that. In practice, it's likely that down the line we will need to version at least some of our tests along with the OS content - by building them as RPMs or sticking them in containers that are versioned with the OS or something. But for now, building fixed upstream releases will give us a lot of reproducibility/control, at the cost of needing to periodically bump them.
1 parent 2851c65 commit b753cc7

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

exttests/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM registry.svc.ci.openshift.org/coreos/cosa-buildroot:latest as builder
2+
COPY build.sh .
3+
RUN ./build.sh
4+
5+
FROM quay.io/coreos-assembler/coreos-assembler:latest
6+
COPY --from=builder /usr/lib/coreos-assembler/tests/kola/ /usr/lib/coreos-assembler/tests/kola/

exttests/README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# POC for gathering upstream tests into a container
2+
3+
We landed support for "exttests" in coreos-assembler:
4+
https://github.com/coreos/coreos-assembler/blob/98d40e6bb13adc02bcd5f02f1d5bff7bafa0780d/mantle/kola/README-kola-ext.md
5+
6+
Since then we are successfully running upstream test suites using
7+
kola on upstream pull requests.
8+
9+
But we also want the inverse: run upstream tests on builds outside
10+
of PRs to those repos.
11+
12+
For example, I really want to run ostree's "transactionality"
13+
test on FCOS builds so that if a kernel change breaks it, we
14+
know that.
15+
16+
## Proposal
17+
18+
- Build this container in api.ci like we're building the cosa buildroot.
19+
- Change the FCOS/RHCOS pipelines to pull this container and do: `kola run ... ext.*`
20+
(This raises some issues like the fact that we'd need to store/share the images
21+
in a way that would allow a secondary container to access them)
22+
23+
### Alternative: coreos-assembler only
24+
25+
Fold this into coreos-assembler.
26+
27+
### Alternative: Make RPMs of tests and install those in coreos-assembler
28+
29+
We have an `ostree-tests` RPM...but I'm not sure I want to deal with
30+
packaging for it.

exttests/build.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -xeuo pipefail
3+
declare -A repos
4+
# Pin versions for now for reproducibility
5+
repos[ostreedev/ostree]=v2020.6
6+
repos[coreos/rpm-ostree]=v2020.5
7+
for repo in "${!repos[@]}"; do
8+
bn=$(basename ${repo})
9+
git clone --depth=1 https://github.com/${repo} ${bn}
10+
# Our "standard" for ext-installed-tests
11+
cd ${bn}/tests/kolainst
12+
make -j 4
13+
make install
14+
cd -
15+
rm ${bn} -rf
16+
done

0 commit comments

Comments
 (0)