From d514ef897e9863d0b5d884e6b0f163044e363af7 Mon Sep 17 00:00:00 2001 From: Reinold Rojas Date: Thu, 21 Nov 2024 16:01:26 -0500 Subject: [PATCH] Boilerplate update --- .ci-operator.yaml | 2 +- OWNERS_ALIASES | 3 +-- boilerplate/_data/backing-image-tag | 2 +- boilerplate/_data/last-boilerplate-commit | 2 +- .../e2e-harness-generate.sh | 6 +----- .../golang-osd-operator-osde2e/update | 17 +++++++++++++++++ .../golang-osd-operator/OWNERS_ALIASES | 3 +-- .../openshift/golang-osd-operator/update | 19 +++++++++++++++++++ build/Dockerfile | 4 ++-- build/Dockerfile.olm-registry | 2 +- config/metadata/additional-labels.txt | 1 + 11 files changed, 46 insertions(+), 15 deletions(-) create mode 100755 boilerplate/openshift/golang-osd-operator-osde2e/update create mode 100644 config/metadata/additional-labels.txt diff --git a/.ci-operator.yaml b/.ci-operator.yaml index f15a3126..5d936014 100644 --- a/.ci-operator.yaml +++ b/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: boilerplate namespace: openshift - tag: image-v5.0.3 + tag: image-v6.0.1 diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index da9e94ed..32f1ca31 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -6,7 +6,7 @@ aliases: srep-functional-team-aurora: - abyrne55 - dakotalongRH - - lnguyen1401 + - joshbranham - luis-falcon - reedcort srep-functional-team-fedramp: @@ -74,7 +74,6 @@ aliases: - Nikokolas3270 - theautoroboto - bmeng - - mjlshen - sam-nguyen7 - ravitri - mmazur diff --git a/boilerplate/_data/backing-image-tag b/boilerplate/_data/backing-image-tag index ae90a676..10efb639 100644 --- a/boilerplate/_data/backing-image-tag +++ b/boilerplate/_data/backing-image-tag @@ -1 +1 @@ -image-v5.0.3 +image-v6.0.1 diff --git a/boilerplate/_data/last-boilerplate-commit b/boilerplate/_data/last-boilerplate-commit index 79c5991b..7c9f64be 100644 --- a/boilerplate/_data/last-boilerplate-commit +++ b/boilerplate/_data/last-boilerplate-commit @@ -1 +1 @@ -fd2674d43e7c364e2139cfb9da204991821ce727 +8563add3b7f509de3b49ba04863d2708d965b489 diff --git a/boilerplate/openshift/golang-osd-operator-osde2e/e2e-harness-generate.sh b/boilerplate/openshift/golang-osd-operator-osde2e/e2e-harness-generate.sh index b1d012ec..ddf7ea02 100755 --- a/boilerplate/openshift/golang-osd-operator-osde2e/e2e-harness-generate.sh +++ b/boilerplate/openshift/golang-osd-operator-osde2e/e2e-harness-generate.sh @@ -25,13 +25,9 @@ export REPLACE_FUNC=$(echo "$REPLACE_SPECNAME" | sed 's/ //g' ) mkdir -p $HARNESS_DIR -E2E_SUITE_BUILDER_IMAGE="registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17" -if [[ -n ${KONFLUX_BUILDS} ]]; then - E2E_SUITE_BUILDER_IMAGE="brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.22" -fi echo "# THIS FILE IS GENERATED BY BOILERPLATE. DO NOT EDIT. -FROM ${E2E_SUITE_BUILDER_IMAGE} as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder WORKDIR /go/src/github.com/openshift/$OPERATOR_NAME/ COPY . . RUN CGO_ENABLED=0 GOFLAGS=\"-mod=mod\" go test ./osde2e -v -c --tags=osde2e -o /harness.test diff --git a/boilerplate/openshift/golang-osd-operator-osde2e/update b/boilerplate/openshift/golang-osd-operator-osde2e/update new file mode 100755 index 00000000..3fbe56c5 --- /dev/null +++ b/boilerplate/openshift/golang-osd-operator-osde2e/update @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e + +source $CONVENTION_ROOT/_lib/common.sh + +# No PRE +[[ "$1" == "PRE" ]] && exit 0 + +# Expect POST +[[ "$1" == "POST" ]] || err "Got a parameter I don't understand: '$1'. Did the infrastructure change?" + +DOCKERFILE=osde2e/Dockerfile +if [[ -n ${KONFLUX_BUILDS} && -f "${DOCKERFILE}" ]]; then + E2E_SUITE_BUILDER_IMAGE="brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.22" + ${SED?} -i "2s,.*,FROM $E2E_SUITE_BUILDER_IMAGE AS builder," "${DOCKERFILE}" +fi diff --git a/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES b/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES index da9e94ed..32f1ca31 100644 --- a/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES +++ b/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES @@ -6,7 +6,7 @@ aliases: srep-functional-team-aurora: - abyrne55 - dakotalongRH - - lnguyen1401 + - joshbranham - luis-falcon - reedcort srep-functional-team-fedramp: @@ -74,7 +74,6 @@ aliases: - Nikokolas3270 - theautoroboto - bmeng - - mjlshen - sam-nguyen7 - ravitri - mmazur diff --git a/boilerplate/openshift/golang-osd-operator/update b/boilerplate/openshift/golang-osd-operator/update index f64a6f27..1accc646 100755 --- a/boilerplate/openshift/golang-osd-operator/update +++ b/boilerplate/openshift/golang-osd-operator/update @@ -32,6 +32,25 @@ if [[ -f ${REPO_ROOT}/.gitignore ]]; then ${SED?} -i "/Dockerfile.olm-registry/d" ${REPO_ROOT}/.gitignore fi +OPERATOR_NAME=$(sed -n 's/.*OperatorName .*"\([^"]*\)".*/\1/p' "${REPO_ROOT}/config/config.go") + +if [[ ! -f ${REPO_ROOT}/config/metadata/additional-labels.txt ]]; then + mkdir -p ${REPO_ROOT}/config/metadata + cat >${REPO_ROOT}/config/metadata/additional-labels.txt <