From 88ebc2543513e612df2a8b1e66376f2af13eb262 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Wed, 27 Nov 2024 13:47:41 -0600 Subject: [PATCH] add subscriptions to OCP konflux builds work --- images/must-gather/Containerfile | 3 ++- images/operator/Dockerfile | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/images/must-gather/Containerfile b/images/must-gather/Containerfile index 1575e9160..489c7fd04 100644 --- a/images/must-gather/Containerfile +++ b/images/must-gather/Containerfile @@ -15,7 +15,8 @@ LABEL \ # Install openshift-clients, jq, tar, and rsync, which are required for # must-gather. -RUN microdnf -y install openshift-clients jq tar rsync +RUN subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") && \ + microdnf -y install openshift-clients jq tar rsync WORKDIR / diff --git a/images/operator/Dockerfile b/images/operator/Dockerfile index 06617c23d..26f080048 100644 --- a/images/operator/Dockerfile +++ b/images/operator/Dockerfile @@ -6,12 +6,15 @@ ENV GOFLAGS="-mod=vendor" BUILD_FLAGS="-tags strictfipsruntime" COPY . . +RUN subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") + RUN make manager FROM registry.redhat.io/ubi9/ubi:latest RUN INSTALL_PKGS="tar" && \ if [ ! -e /usr/bin/dnf ]; then ln -s /usr/bin/microdnf /usr/bin/dnf; fi && \ + subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") && \ dnf update glibc -y && \ dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ dnf clean all && rm -rf /var/cache/*