From e9fda93296a9eba4de41295e56db27f29aeaba61 Mon Sep 17 00:00:00 2001 From: Dustin Row Date: Tue, 26 Nov 2024 09:57:04 -0800 Subject: [PATCH] Boilerplate: Update to b0f8c3286cb9ec17059e7870e7fcb1a2049e16f0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conventions: - openshift/golang-osd-operator: Update - openshift/golang-osd-operator-osde2e: Update --- https://github.com/openshift/boilerplate/compare/b9d4e1ee64a3df00201d6c0c82b83c2e84e553aa...b0f8c3286cb9ec17059e7870e7fcb1a2049e16f0 commit: af5c9d7871e141e9735fc578d7711e22ef9e73b2 author: Benson Ngoy removes leading g before comparing short_hash to DEPLOYED_HASH commit: 0ed6bd57140fc4e000a11dabc6a1f69c27884f62 author: Josh Branham Exit early if skopeo binary not found commit: de410f4b290b2e398864ba173ccbdc4de1dc2a26 author: red-hat-konflux[bot] chore(deps): update konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 13d1bbd579b6ef8067620f85a945837c96c90d59 author: Josh Branham Cleanup srep-functional-team-aurora alias commit: f42a693ac096a26d6a394264f2f253ab4486c26b author: Luis Falcon Removing michael shen from OWNER_ALIAS FILE as part of the leaver process commit: 312bf1622014a0d8b1a65aa6c30c49ae87901608 author: Brady Pratt pipelines/catalog-builder: change dockerfile default the generated file is catalog.Dockerfile Signed-off-by: Brady Pratt commit: e06b60f89904733b05bd73260b3a7e33c9511215 author: Brady Pratt pipelines/catalog-builder: add deprecated-base-image-check task this is required by the EC checks ``` ✕ [Violation] tasks.required_tasks_found ImageRef: quay.io/redhat-user-workloads/oeo-cicada-tenant/osd-example-operator-main/osd-example-operator-main/catalog@sha256:70cbca46b46d21b4aecfb39a92cc80287ac776255c8f3b21f4ea9bd226b99a7f Reason: Required task "deprecated-image-check" is missing Title: All required tasks were included in the pipeline Description: Ensure that the set of required tasks are included in the PipelineRun attestation. To exclude this rule add "tasks.required_tasks_found:deprecated-image-check" to the `exclude` section of the policy configuration. Solution: Make sure all required tasks are in the build pipeline. The required task list is contained as xref:ec-cli:ROOT:configuration.adoc#_data_sources[data] under the key 'required-tasks'. ``` Signed-off-by: Brady Pratt commit: bdaaa877760d5a69430fced075388bf6bc000328 author: Brady Pratt pipelines/bundle-builder: fix indentation need to write up some tests for this... Signed-off-by: Brady Pratt commit: 259fb276f80207af9bd7627edf7cb7c1cc74a81f author: Brady Pratt pipelines/bundle-builder: add rpm-signature-scan its a required task though I don't know how well it will operate on the OLM bundle images Signed-off-by: Brady Pratt commit: f14cd9948f68e7d409854f89dd3e6d2b138dcbd0 author: red-hat-konflux[bot] chore(deps): update konflux references to d091a9e Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 5606e36c9b48805b9b732c90ae99e8461e49f8e0 author: red-hat-konflux[bot] chore(deps): update konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: ee948b850dfab298bbbca1d008cfebb043fc3dee author: Brady Pratt pipelines/bundle-builder: swap from plus to minus operator-sdk doesn't like the plus so use minus instead Signed-off-by: Brady Pratt commit: 6b5d4401214543c0eb4783de221dc44d3c8ce7a4 author: Brady Pratt pipelines/bundle-builder: add +g to sha this will change the version to `0.2.1731576556+g0666347` a `+` is usually used to append this metadata, not a `-` ``` time="2024-11-14T09:30:34Z" level=fatal msg="invalid command options: 0.2.1731576556-0666347 is not a valid semantic version: Numeric PreRelease version must not contain leading zeroes "0666347"" ``` Signed-off-by: Brady Pratt commit: f7b8bcfd73b30fc4953ec0c7d7eacf987e675cc3 author: Brady Pratt pipelines/bundle-builder: set major/minor version to 0.2.X Signed-off-by: Brady Pratt commit: 6cbbfdb933b33c1a887809a4c7b1b5c505eb9e59 author: Brady Pratt write out additional-labels.txt this is required by Konflux to pass validation. The labels get appended to the OLM bundle dockerfile. Teams will need to update the description field Signed-off-by: Brady Pratt commit: cf70616a2a57fc57de8b70f34a7b7f71d5d81e9f author: red-hat-konflux[bot] chore(deps): update konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 40b5527c05cf167967087b062a5676d3ad77c658 author: red-hat-konflux[bot] chore(deps): update konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 733a1083d1a2808e95df139f828c72392b81233c author: Brady Pratt fix: add GOPATH to PATH https://redhat-internal.slack.com/archives/CFJD1NZFT/p1731341694284609?thread_ts=1731337912.626849&cid=CFJD1NZFT Signed-off-by: Brady Pratt commit: 3629981d9035f8269857c9adf297183ab797fb95 author: red-hat-konflux[bot] chore(deps): update konflux references to 0f7df2d Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 6ea077df4ab51a9197ff0085df3b11d4f3eb1b9c author: Brady Pratt .tekton: add rpms-signature-scan task it is required, EC checks are failing because it is missing Signed-off-by: Brady Pratt commit: 7df9cbf53c5db1bea727e2d2d799be3711d378ae author: red-hat-konflux[bot] chore(deps): update konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 9d7b1c5ab9157b7a59ada1638f4eb346a5bd8f8c author: Brady Pratt fix: add .tekton to includePaths this seems to be overidden from the extended renovate config and only working on the pipelines/ directory Signed-off-by: Brady Pratt commit: a42cb70334ffc76978db3def12d15499594235cd author: red-hat-konflux[bot] chore(deps): update konflux references to 11b7f08 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 3fc3d56c802fb69b272f4d1faa5a5a0eb957e133 author: red-hat-konflux[bot] chore(deps): update konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: 89a937c9e2b0652856ce30615754225e8dfcddba author: Brady Pratt chore: rename renovate config spelling err Signed-off-by: Brady Pratt commit: 6e98a4b9b3b2d82c1bf3f3304a2282a458934b82 author: red-hat-konflux Red Hat Konflux purge bundle-builder Signed-off-by: red-hat-konflux commit: 04c0439f8860545757f99abd3e6d461e12a349d1 author: red-hat-konflux Red Hat Konflux purge catalog-builder Signed-off-by: red-hat-konflux commit: 142de2d02479e688249a7b3dc051a65f9eb22f4d author: Brady Pratt chore: add rennovate config to keep the tekton pipelines up to date Signed-off-by: Brady Pratt commit: d59b0b5120af2b7ee4dc16d1f159884ee63e0ced author: Brady Pratt golang-osd-operator-osde2e: swap image base on update Signed-off-by: Brady Pratt commit: 1bd491896cd36500e60be09789b615652bd06994 author: Brady Pratt Revert "golang-osd-operator-osde2e: alter base image" This reverts commit f37e720681da5a5ef768d8025eefc12a27860663. commit: 319f56ac13aee991b1bd13136c4c473d6b793ca2 author: red-hat-konflux[bot] chore(deps): update konflux references to 3be04ad Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> commit: da663bd82b017a0caa96d65eef25582c210e0795 author: Brady Pratt KONFLUX-3729: swap to new base image on update operators should now start pointing to the konflux built base image, it is public and can be pulled from Jenkins without issue; this swap will be required when an operator begins onboarding onto konflux Signed-off-by: Brady Pratt commit: c608108dd6b09186400dc34e0cb89c0b1fc9ba88 author: Dustin Row Symlink OWNERS_ALIASES and update BP Owners for more coverage commit: 07bc19ce54b73298991228c6b81e484c653780b7 author: Brady Pratt KONFLUX-3729: swap over image and rm build script Signed-off-by: Brady Pratt commit: 0f9606bf2726eea4d379cce05548ff65d5587b50 author: Brady Pratt OWNERS: add self to reviewers Signed-off-by: Brady Pratt commit: 7452d63e3654df807f16f6eb1fc81b73290aa29a author: Brady Pratt fix: quotes preventing expansion ``` ... ++ mktemp -d + BP_CLONE=/tmp/tmp.1P95PaSBNN + [[ -z '' ]] + git clone -b konflux-swapover git@github.com:jbpratt/boilerplate.git /tmp/tmp.1P95PaSBNN Cloning into '/tmp/tmp.1P95PaSBNN'... remote: Enumerating objects: 4473, done. remote: Counting objects: 100% (792/792), done. ... ``` Signed-off-by: Brady Pratt commit: 5b81904a97992638af306f4bd16ae4c72517ed97 author: Brady Pratt fix: allow custom clone commands for updating this was removed in f306247c32d68c82a446399e27c37e90b75fccfe and is needed to clone a non-default branch of boilerplate Signed-off-by: Brady Pratt --- .ci-operator.yaml | 2 +- OWNERS_ALIASES | 3 +-- boilerplate/_data/backing-image-tag | 2 +- boilerplate/_data/last-boilerplate-commit | 2 +- boilerplate/_lib/common.sh | 5 +++++ .../e2e-harness-generate.sh | 6 +----- .../golang-osd-operator-osde2e/update | 17 +++++++++++++++++ .../golang-osd-operator/OWNERS_ALIASES | 3 +-- .../csv-generate/csv-generate.sh | 6 +++++- .../openshift/golang-osd-operator/update | 19 +++++++++++++++++++ boilerplate/update | 5 ++++- build/Dockerfile | 2 +- config/metadata/additional-labels.txt | 1 + 13 files changed, 58 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 9b90924..5d93601 100644 --- a/.ci-operator.yaml +++ b/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: boilerplate namespace: openshift - tag: image-v5.0.1 + tag: image-v6.0.1 diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index da9e94e..32f1ca3 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 cb5b3ff..10efb63 100644 --- a/boilerplate/_data/backing-image-tag +++ b/boilerplate/_data/backing-image-tag @@ -1 +1 @@ -image-v5.0.1 +image-v6.0.1 diff --git a/boilerplate/_data/last-boilerplate-commit b/boilerplate/_data/last-boilerplate-commit index 97ed4a8..114b48e 100644 --- a/boilerplate/_data/last-boilerplate-commit +++ b/boilerplate/_data/last-boilerplate-commit @@ -1 +1 @@ -b9d4e1ee64a3df00201d6c0c82b83c2e84e553aa +b0f8c3286cb9ec17059e7870e7fcb1a2049e16f0 diff --git a/boilerplate/_lib/common.sh b/boilerplate/_lib/common.sh index c5ee7f4..dfc1e5b 100755 --- a/boilerplate/_lib/common.sh +++ b/boilerplate/_lib/common.sh @@ -89,6 +89,11 @@ image_exists_in_repo() { local skopeo_stderr=$(mktemp) + if ! command -v skopeo &>/dev/null; then + echo "Failed to find the skopeo binary. If you are on Mac: brew install skopeo." >&2 + exit 1 + fi + output=$(skopeo inspect docker://${image_uri} 2>$skopeo_stderr) rc=$? # So we can delete the temp file right away... 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 b1d012e..ddf7ea0 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 0000000..3fbe56c --- /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 da9e94e..32f1ca3 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/csv-generate/csv-generate.sh b/boilerplate/openshift/golang-osd-operator/csv-generate/csv-generate.sh index 3778ebe..1b69bed 100755 --- a/boilerplate/openshift/golang-osd-operator/csv-generate/csv-generate.sh +++ b/boilerplate/openshift/golang-osd-operator/csv-generate/csv-generate.sh @@ -169,7 +169,11 @@ if [[ -z "$SKIP_SAAS_FILE_CHECKS" ]]; then if [[ "$delete" == false ]]; then short_hash=$(echo "$version" | cut -d- -f2) - + + # before comparing the short_hash to the deployment hash, remove the leading g added in https://issues.redhat.com/browse/OSD-13681 + # short_hash should be 7 char long without the leading g. + [ ${#short_hash} -gt 7 ] && short_hash=${short_hash:1:7} + if [[ "$DEPLOYED_HASH" == "${short_hash}"* ]]; then delete=true fi diff --git a/boilerplate/openshift/golang-osd-operator/update b/boilerplate/openshift/golang-osd-operator/update index f64a6f2..1accc64 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 <