diff --git a/go.mod b/go.mod index 6385209b3..662ea3062 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/onsi/ginkgo/v2 v2.20.0 github.com/onsi/gomega v1.34.1 github.com/openshift/api v0.0.0-20240527133614-ba11c1587003 - github.com/openshift/build-machinery-go v0.0.0-20240419090851-af9c868bcf52 + github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2 github.com/openshift/library-go v0.0.0-20240621150525-4bb4238aef81 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.18.0 diff --git a/go.sum b/go.sum index 3308570b0..92486cd80 100644 --- a/go.sum +++ b/go.sum @@ -207,8 +207,8 @@ github.com/opencontainers/image-spec v1.1.0-rc6 h1:XDqvyKsJEbRtATzkgItUqBA7QHk58 github.com/opencontainers/image-spec v1.1.0-rc6/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/openshift/api v0.0.0-20240527133614-ba11c1587003 h1:ewhIvyXCcvH6m3U02bMFtd/DfsmOSbOCuVzon+zGu7g= github.com/openshift/api v0.0.0-20240527133614-ba11c1587003/go.mod h1:OOh6Qopf21pSzqNVCB5gomomBXb8o5sGKZxG2KNpaXM= -github.com/openshift/build-machinery-go v0.0.0-20240419090851-af9c868bcf52 h1:bqBwrXG7sbJUqP1Og1bR8FvVh7qb7CrMgy9saKmOZFs= -github.com/openshift/build-machinery-go v0.0.0-20240419090851-af9c868bcf52/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= +github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2 h1:Pw/OKhN0r8HZcR4No8qh0QygTvuYsDeZhHsK6T9LC+I= +github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87 h1:JtLhaGpSEconE+1IKmIgCOof/Len5ceG6H1pk43yv5U= github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87/go.mod h1:3IPD4U0qyovZS4EFady2kqY32m8lGcbs/Wx+yprg9z8= github.com/openshift/library-go v0.0.0-20240621150525-4bb4238aef81 h1:cAo++YCkjrClksMEAPqK9SLMCroqlbGxNTluxeKGIGc= diff --git a/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml b/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml index 7096df34e..1e59c02c2 100644 --- a/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml +++ b/vendor/github.com/openshift/build-machinery-go/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: release namespace: openshift - tag: rhel-9-release-golang-1.20-openshift-4.15 + tag: rhel-9-release-golang-1.22-openshift-4.17 diff --git a/vendor/github.com/openshift/build-machinery-go/.gitignore b/vendor/github.com/openshift/build-machinery-go/.gitignore new file mode 100644 index 000000000..19607d9e6 --- /dev/null +++ b/vendor/github.com/openshift/build-machinery-go/.gitignore @@ -0,0 +1 @@ +*.log.raw diff --git a/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker b/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker index a6d656344..8d7058a15 100644 --- a/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker +++ b/vendor/github.com/openshift/build-machinery-go/Dockerfile.commitchecker @@ -1,12 +1,12 @@ # This Dockerfile must be on the top-level of this repo, because it needs to copy # both commitchecker/ and make/ into the build container. -FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.20-openshift-4.15 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder WORKDIR /go/src/github.com/openshift/build-machinery-go COPY . . RUN make -C commitchecker -FROM registry.ci.openshift.org/ocp/4.15:base +FROM registry.ci.openshift.org/ocp/4.17:base-rhel9 COPY --from=builder /go/src/github.com/openshift/build-machinery-go/commitchecker/commitchecker /usr/bin/ RUN dnf install --setopt=tsflags=nodocs -y git && \ dnf clean all && rm -rf /var/cache/yum/* diff --git a/vendor/github.com/openshift/build-machinery-go/OWNERS b/vendor/github.com/openshift/build-machinery-go/OWNERS index e016cc303..1bbac46c7 100644 --- a/vendor/github.com/openshift/build-machinery-go/OWNERS +++ b/vendor/github.com/openshift/build-machinery-go/OWNERS @@ -1,9 +1,9 @@ reviewers: - - sttts - - mfojtik - - soltysh - 2uasimojo + - benluddy + - jsafrane + - sanchezl approvers: - - sttts - - mfojtik - - soltysh + - benluddy + - jsafrane + - sanchezl diff --git a/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log b/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log index 47b04e6fe..b636e3926 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log +++ b/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log @@ -13,6 +13,7 @@ image-ocp-openshift-apiserver-operator images telepresence test +test-operator-integration test-unit update update-bindata @@ -21,6 +22,7 @@ update-deps-overrides update-generated update-gofmt update-profile-manifests +update-test-operator-integration verify verify-bindata verify-codegen diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk index 4e15c771a..c64e5cf92 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/controller-gen.mk @@ -3,6 +3,26 @@ include $(addprefix $(dir $(lastword $(MAKEFILE_LIST))), \ ../../lib/tmp.mk \ ) +############## +# DEPRECATED # +############## +# This utility is hard to maintain due to the need to continuously build and release binaries for +# multiple platforms and versions. Instead it is recommended that you: +# - Vendor the sigs.k8s.io/controller-tools repository. +# - Write a local rule to (lazily) build the controller-gen binary from the vendored repo. +# For example: +# +# CONTROLLER_GEN_SRC := $(shell realpath vendor/sigs.k8s.io/controller-tools/cmd/controller-gen) +# CONTROLLER_GEN := $(shell go list -f '{{.Target}}' $(CONTROLLER_GEN_SRC)) +# $(CONTROLLER_GEN): $(CONTROLLER_GEN_SRC) +# go install $(CONTROLLER_GEN_SRC) +# +# This allows you to upgrade versions simply by revendoring controller-tools: +# - Bump the semver in your go.mod +# - go mod tidy +# - go mod vendor +############## + # NOTE: The release binary specified here needs to be built properly so that # `--version` works correctly. Just using `go build` will result in it # reporting `(devel)`. To build for a given platform: diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk index c53c3f1b9..90096dc5d 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/images.mk @@ -7,15 +7,21 @@ include $(addprefix $(dir $(lastword $(MAKEFILE_LIST))), \ # make images IMAGE_BUILD_EXTRA_FLAGS='-mount ~/projects/origin-repos/4.2/:/etc/yum.repos.d/' IMAGE_BUILD_DEFAULT_FLAGS ?=--allow-pull IMAGE_BUILD_EXTRA_FLAGS ?= +IMAGE_BUILD_BUILDER ?= imagebuilder # $1 - target name # $2 - image ref # $3 - Dockerfile path # $4 - context +# only run ensure-imagebuilder when imagebuilder is used define build-image-internal +ifeq ($(IMAGE_BUILD_BUILDER),imagebuilder) image-$(1): ensure-imagebuilder +else +image-$(1): +endif $(strip \ - imagebuilder \ + $(IMAGE_BUILD_BUILDER) \ $(IMAGE_BUILD_DEFAULT_FLAGS) \ -t $(2) -f $(3) \ diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/mom.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/mom.mk new file mode 100644 index 000000000..21c81afe0 --- /dev/null +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/mom.mk @@ -0,0 +1,10 @@ +scripts_dir :=$(shell realpath $(dir $(lastword $(MAKEFILE_LIST)))../../../../scripts) + +test-operator-integration: build + bash $(scripts_dir)/test-operator-integration.sh +.PHONY: test-operator-integration + +update-test-operator-integration: build + REPLACE_TEST_OUTPUT=true bash $(scripts_dir)/test-operator-integration.sh + +.PHONY: update-test-operator-integration diff --git a/vendor/github.com/openshift/build-machinery-go/scripts/test-operator-integration.sh b/vendor/github.com/openshift/build-machinery-go/scripts/test-operator-integration.sh new file mode 100644 index 000000000..262bf6010 --- /dev/null +++ b/vendor/github.com/openshift/build-machinery-go/scripts/test-operator-integration.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail +set -x + +# Install multi-operator-manager. This will make sure the latest binary is installed +# If the installation failed, keep going, maybe the binary is available in the system +echo "Installing latest version of multi-operator-manager..." +if ! go install -mod=readonly github.com/openshift/multi-operator-manager/cmd/multi-operator-manager@latest; then + echo "Error: Failed to install multi-operator-manager." +fi + +# Check if the multi-operator-manager is installed; if not, fail +if ! command -v multi-operator-manager &> /dev/null; then + echo "Error: multi-operator-manager binary not available." + exit 1 +fi + +REPLACE_TEST_OUTPUT="${REPLACE_TEST_OUTPUT:-false}" + +# Define the path to the operator binary +MOM_CMD="${MOM_CMD:-multi-operator-manager}" + +# Define input and output directories (can be overridden if necessary) +APPLY_CONFIG_INPUT_DIR="${APPLY_CONFIG_INPUT_DIR:-./test-data/apply-configuration}" +APPLY_CONFIG_OUTPUT_DIR="${ARTIFACT_DIR:-./test-output}" + +# Make sure the output-dir is clean +if [ -d "${APPLY_CONFIG_OUTPUT_DIR}" ]; then + echo "Cleaning up existing ${APPLY_CONFIG_OUTPUT_DIR}" + rm -rf "${APPLY_CONFIG_OUTPUT_DIR}" +fi + +# Assemble the args +APPLY_CONFIG_ARGS=( + test + apply-configuration + --test-dir="$APPLY_CONFIG_INPUT_DIR" + --output-dir="$APPLY_CONFIG_OUTPUT_DIR" +) + +if [ "$REPLACE_TEST_OUTPUT" == "true" ] +then + APPLY_CONFIG_ARGS=("${APPLY_CONFIG_ARGS[@]}" "--replace-expected-output=true") +else + APPLY_CONFIG_ARGS=("${APPLY_CONFIG_ARGS[@]}" "--preserve-policy=KeepAlways") +fi + +# Run the apply-configuration command from the operator +"${MOM_CMD}" "${APPLY_CONFIG_ARGS[@]}" diff --git a/vendor/modules.txt b/vendor/modules.txt index 26607b526..d28220c78 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -368,8 +368,8 @@ github.com/openshift/api/template github.com/openshift/api/template/v1 github.com/openshift/api/user github.com/openshift/api/user/v1 -# github.com/openshift/build-machinery-go v0.0.0-20240419090851-af9c868bcf52 -## explicit; go 1.13 +# github.com/openshift/build-machinery-go v0.0.0-20250211133638-a00a772ae1a2 +## explicit; go 1.22.0 github.com/openshift/build-machinery-go github.com/openshift/build-machinery-go/make github.com/openshift/build-machinery-go/make/lib