diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index d9df511d..00000000 --- a/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -# This Dockerfile *used* to run rpm-ostree, but -# we now have a custom build process. We're just -# keeping this Dockerfile around as there's a Prow -# job that looks at it. -FROM registry.fedoraproject.org/fedora:28 diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 00000000..ecf16374 --- /dev/null +++ b/ci/Dockerfile @@ -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 . . diff --git a/ci/build-test-qemu.sh b/ci/build-test-qemu.sh new file mode 100755 index 00000000..7c30d9ce --- /dev/null +++ b/ci/build-test-qemu.sh @@ -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. diff --git a/ci/build-test.sh b/ci/build-test.sh deleted file mode 100755 index d0d38168..00000000 --- a/ci/build-test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -xeuo pipefail -# First ensure submodules are initialized -git submodule update --init --recursive -# Basic syntax check -./fedora-coreos-config/ci/validate -# Prow jobs don't support adding emptydir today -export COSA_SKIP_OVERLAY=1 -gitdir=$(pwd) -cd $(mktemp -d) -cosa init ${gitdir} -# 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. diff --git a/ci/build-test.sh b/ci/build-test.sh new file mode 120000 index 00000000..98ce07eb --- /dev/null +++ b/ci/build-test.sh @@ -0,0 +1 @@ +validate.sh \ No newline at end of file diff --git a/ci/validate.sh b/ci/validate.sh new file mode 100755 index 00000000..d5e68ea6 --- /dev/null +++ b/ci/validate.sh @@ -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