Skip to content
/ os Public
forked from openshift/os

Commit de52871

Browse files
committed
extensions: Only setup repos on SCOS 9 for now
1 parent ac73caa commit de52871

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

extensions/Dockerfile

+21-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,27 @@ ARG COSA
1010
ARG VARIANT
1111
RUN if [[ -z "$COSA" ]] ; then ci/get-ocp-repo.sh --ocp-layer packages-openshift.yaml; fi
1212
# on SCOS, we need to add the GPG keys of the various SIGs we need
13-
RUN if rpm -q centos-stream-release && ! rpm -q centos-release-cloud; then dnf install -y centos-release-{cloud,nfv,virt}-common; fi
14-
RUN mkdir -p /usr/share/distribution-gpg-keys/centos
15-
RUN ln -s /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial /usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-Official
16-
RUN ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-Cloud
17-
RUN ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
18-
RUN ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-NFV
19-
RUN ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-Virtualization
20-
RUN if [[ -n "${VARIANT}" ]]; then MANIFEST="manifest-${VARIANT}.yaml"; EXTENSIONS="extensions-${VARIANT}.yaml"; else MANIFEST="manifest.yaml"; EXTENSIONS="extensions.yaml"; fi && rpm-ostree compose extensions --rootfs=/ --output-dir=/usr/share/rpm-ostree/extensions/ ./"${MANIFEST}" ./"${EXTENSIONS}"
13+
RUN if rpm -q centos-stream-release; then \
14+
if [[ $(rpm -q --qf "%{VERSION}" centos-stream-release) == "9.0" ]]; then \
15+
if ! rpm -q centos-release-cloud; then \
16+
dnf install -y centos-release-{cloud,nfv,virt}-common; \
17+
fi && \
18+
mkdir -p /usr/share/distribution-gpg-keys/centos && \
19+
ln -s /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial /usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-Official && \
20+
ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-Cloud && \
21+
ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 && \
22+
ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-NFV && \
23+
ln -s {/etc/pki/rpm-gpg,/usr/share/distribution-gpg-keys/centos}/RPM-GPG-KEY-CentOS-SIG-Virtualization ; \
24+
fi ; \
25+
fi
26+
RUN if [[ -n "${VARIANT}" ]]; then \
27+
MANIFEST="manifest-${VARIANT}.yaml"; \
28+
EXTENSIONS="extensions-${VARIANT}.yaml"; \
29+
else \
30+
MANIFEST="manifest.yaml"; \
31+
EXTENSIONS="extensions.yaml"; \
32+
fi && \
33+
rpm-ostree compose extensions --rootfs=/ --output-dir=/usr/share/rpm-ostree/extensions/ ./"${MANIFEST}" ./"${EXTENSIONS}"
2134

2235
## Creates the repo metadata for the extensions.
2336
## This uses Fedora as a lowest-common-denominator because it will work on

0 commit comments

Comments
 (0)