diff --git a/ci/build-test-qemu-rhcos.sh b/ci/build-test-qemu-rhcos.sh new file mode 100755 index 00000000..00dc8769 --- /dev/null +++ b/ci/build-test-qemu-rhcos.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -xeuo pipefail +# This script is the entrypoint for PRs to this repo via OpenShift Prow. +dn=$(dirname "${0}") +# Prow jobs don't support adding emptydir today +export COSA_SKIP_OVERLAY=1 +# Create a temporary cosa workdir if COSA_DIR is not set. +cosa_dir="${COSA_DIR:-$(mktemp -d)}" +echo "Using ${cosa_dir} for build" +cd "${cosa_dir}" +cosa init /src + +# Default to building RHCOS unless we were explicitely called to build SCOS +if [[ "${#}" -eq 1 ]] && [[ "${1}" == "scos" ]]; then + exec "${dn}/prow-build-test-qemu.sh" scos +fi +exec "${dn}/prow-build-test-qemu.sh" diff --git a/ci/build-test-qemu-scos.sh b/ci/build-test-qemu-scos.sh index 4111618e..ee220371 100755 --- a/ci/build-test-qemu-scos.sh +++ b/ci/build-test-qemu-scos.sh @@ -2,4 +2,4 @@ set -xeuo pipefail # SCOS wrapper for the entrypoint for PRs to this repo via OpenShift Prow. dn=$(dirname "${0}") -exec "${dn}/prow-build-test-qemu.sh" scos +exec "${dn}/build-test-qemu-rhcos.sh" scos diff --git a/ci/build-test-qemu.sh b/ci/build-test-qemu.sh deleted file mode 100755 index 00dc8769..00000000 --- a/ci/build-test-qemu.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -xeuo pipefail -# This script is the entrypoint for PRs to this repo via OpenShift Prow. -dn=$(dirname "${0}") -# Prow jobs don't support adding emptydir today -export COSA_SKIP_OVERLAY=1 -# Create a temporary cosa workdir if COSA_DIR is not set. -cosa_dir="${COSA_DIR:-$(mktemp -d)}" -echo "Using ${cosa_dir} for build" -cd "${cosa_dir}" -cosa init /src - -# Default to building RHCOS unless we were explicitely called to build SCOS -if [[ "${#}" -eq 1 ]] && [[ "${1}" == "scos" ]]; then - exec "${dn}/prow-build-test-qemu.sh" scos -fi -exec "${dn}/prow-build-test-qemu.sh" diff --git a/ci/build-test-qemu.sh b/ci/build-test-qemu.sh new file mode 120000 index 00000000..a9ca23a6 --- /dev/null +++ b/ci/build-test-qemu.sh @@ -0,0 +1 @@ +build-test-qemu-scos.sh \ No newline at end of file diff --git a/ci/prow-build-test-qemu.sh b/ci/prow-build-test-qemu.sh index ed091829..b9ddabba 100755 --- a/ci/prow-build-test-qemu.sh +++ b/ci/prow-build-test-qemu.sh @@ -34,9 +34,9 @@ if test '!' -w src/config; then fi # Replace manifest.yaml symlink to point to SCOS -if [[ "${KIND}" == "scos" ]]; then - ln -sf manifest-scos.yaml src/config/manifest.yaml -fi +# if [[ "${KIND}" == "scos" ]]; then +# ln -sf manifest-scos.yaml src/config/manifest.yaml +# fi # Grab the raw value of `mutate-os-release` and use sed to convert the value # to X-Y format diff --git a/ci/prow-thisrepo-entrypoint.sh b/ci/prow-thisrepo-entrypoint.sh index e2e8d59a..a9ca23a6 120000 --- a/ci/prow-thisrepo-entrypoint.sh +++ b/ci/prow-thisrepo-entrypoint.sh @@ -1 +1 @@ -build-test-qemu.sh \ No newline at end of file +build-test-qemu-scos.sh \ No newline at end of file diff --git a/extensions-rhcos.yaml b/extensions-rhcos.yaml new file mode 100644 index 00000000..d989e3b0 --- /dev/null +++ b/extensions-rhcos.yaml @@ -0,0 +1,62 @@ +# RPMs as operating system extensions, distinct from the base ostree commit/image +# https://github.com/openshift/enhancements/blob/master/enhancements/rhcos/extensions.md +# and https://github.com/coreos/fedora-coreos-tracker/issues/401 + +repos: + - rhel-8-nfv + +extensions: + # https://github.com/coreos/fedora-coreos-tracker/issues/326 + usbguard: + packages: + - usbguard + kerberos: + packages: + - krb5-workstation + - libkadm5 + # https://github.com/kmods-via-containers/kmods-via-containers/issues/3 + # https://gitlab.cee.redhat.com/coreos/redhat-coreos/merge_requests/866 + # These are currently overlaid onto the host so that they can be bind-mounted + # into build containers... in the future they should be a `development` + # extension: https://github.com/openshift/machine-config-operator/pull/2143. + kernel-devel: + packages: + - kernel-devel + - kernel-headers + match-base-evr: kernel + # These are already in the base, so they're not OS extensions, but they're + # useful to have in RPM form to install in kmod build containers. + kernel: + kind: development + packages: + - kernel + - kernel-core + - kernel-modules + - kernel-modules-extra + match-base-evr: kernel + # GRPA-2822 + # https://github.com/openshift/machine-config-operator/pull/1330 + # https://github.com/openshift/enhancements/blob/master/enhancements/support-for-realtime-kernel.md + kernel-rt: + architectures: + - x86_64 + packages: + - kernel-rt-core + - kernel-rt-kvm + - kernel-rt-modules + - kernel-rt-modules-extra + - kernel-rt-devel + # https://github.com/openshift/machine-config-operator/pull/2456 + # https://github.com/openshift/enhancements/blob/master/enhancements/sandboxed-containers/sandboxed-containers-tech-preview.md + # GRPA-3123 + # - kata-containers (RHAOS) + sandboxed-containers: + architectures: + - x86_64 + modules: + enable: + - virt:rhel + repos: + - rhel-8-appstream + packages: + - kata-containers diff --git a/extensions.yaml b/extensions.yaml deleted file mode 100644 index d989e3b0..00000000 --- a/extensions.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# RPMs as operating system extensions, distinct from the base ostree commit/image -# https://github.com/openshift/enhancements/blob/master/enhancements/rhcos/extensions.md -# and https://github.com/coreos/fedora-coreos-tracker/issues/401 - -repos: - - rhel-8-nfv - -extensions: - # https://github.com/coreos/fedora-coreos-tracker/issues/326 - usbguard: - packages: - - usbguard - kerberos: - packages: - - krb5-workstation - - libkadm5 - # https://github.com/kmods-via-containers/kmods-via-containers/issues/3 - # https://gitlab.cee.redhat.com/coreos/redhat-coreos/merge_requests/866 - # These are currently overlaid onto the host so that they can be bind-mounted - # into build containers... in the future they should be a `development` - # extension: https://github.com/openshift/machine-config-operator/pull/2143. - kernel-devel: - packages: - - kernel-devel - - kernel-headers - match-base-evr: kernel - # These are already in the base, so they're not OS extensions, but they're - # useful to have in RPM form to install in kmod build containers. - kernel: - kind: development - packages: - - kernel - - kernel-core - - kernel-modules - - kernel-modules-extra - match-base-evr: kernel - # GRPA-2822 - # https://github.com/openshift/machine-config-operator/pull/1330 - # https://github.com/openshift/enhancements/blob/master/enhancements/support-for-realtime-kernel.md - kernel-rt: - architectures: - - x86_64 - packages: - - kernel-rt-core - - kernel-rt-kvm - - kernel-rt-modules - - kernel-rt-modules-extra - - kernel-rt-devel - # https://github.com/openshift/machine-config-operator/pull/2456 - # https://github.com/openshift/enhancements/blob/master/enhancements/sandboxed-containers/sandboxed-containers-tech-preview.md - # GRPA-3123 - # - kata-containers (RHAOS) - sandboxed-containers: - architectures: - - x86_64 - modules: - enable: - - virt:rhel - repos: - - rhel-8-appstream - packages: - - kata-containers diff --git a/extensions.yaml b/extensions.yaml new file mode 120000 index 00000000..c771e882 --- /dev/null +++ b/extensions.yaml @@ -0,0 +1 @@ +extensions-scos.yaml \ No newline at end of file diff --git a/manifest.yaml b/manifest.yaml index 27c889dc..30daaf1b 120000 --- a/manifest.yaml +++ b/manifest.yaml @@ -1 +1 @@ -manifest-rhcos.yaml \ No newline at end of file +manifest-scos.yaml \ No newline at end of file