-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aiming to fix #506 I think the problem here may be related to the fact that we're trying to do all of our CI as part of a build. Instead, let's function like e.g. the CI for coreos/rpm-ostree which creates a derived container from the source code. For us, this derived container is basically the 2-tuple (source, cosa). For coreos/rpm-ostree we actually do generate binaries as well as test code from the buildroot, i.e. a 3 tuple (binaries, test binaries, cosa). But here we don't need that, there's no actual "build" step. Split off `validate.sh` as a separate thing that can be a clearly separate step.
- Loading branch information
Showing
5 changed files
with
37 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# For CI on a config git repo, all we need to do is combine | ||
# the source code with coreos-assembler into an image to test. | ||
FROM registry.svc.ci.openshift.org/coreos/coreos-assembler:latest | ||
WORKDIR /src | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
set -xeuo pipefail | ||
# Prow jobs don't support adding emptydir today | ||
export COSA_SKIP_OVERLAY=1 | ||
# We generate .repo files which write to the source, but | ||
# we captured the source as part of the Docker build. | ||
# In OpenShift default SCC we'll run as non-root, so we need | ||
# to make a new copy of the source. TODO fix cosa to be happy | ||
# if src/config already exists instead of wanting to reference | ||
# it or clone it. Or we could write our .repo files to a separate | ||
# place. | ||
tmpsrc=$(mktemp -d) | ||
cp -a /src ${tmpsrc}/src | ||
# Create a temporary cosa workdir | ||
cd $(mktemp -d) | ||
cosa init ${tmpsrc}/src | ||
# TODO query the 4-8 bits from manifest.yaml or so | ||
curl -L http://base-4-8-rhel8.ocp.svc.cluster.local > src/config/ocp.repo | ||
cosa fetch | ||
cosa build | ||
cosa kola --basic-qemu-scenarios | ||
cosa kola run 'ext.*' | ||
# TODO: all tests in the future, but there are a lot | ||
# and we want multiple tiers, and we need to split them | ||
# into multiple pods and stuff. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validate.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -xeuo pipefail | ||
# First ensure submodules are initialized | ||
git submodule update --init --recursive | ||
# Basic syntax check | ||
./fedora-coreos-config/ci/validate |