diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 27c89092..ca5fda7f 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -5,7 +5,9 @@ aliases: srep-functional-team-aurora: - abyrne55 + - AlexSmithGH - dakotalongRH + - eth1030 - joshbranham - luis-falcon - reedcort @@ -65,14 +67,12 @@ aliases: - feichashao - samanthajayasinghe - xiaoyu74 - - Dee-6777 - Tessg22 - smarthall srep-infra-cicd: - ritmun - yiqinzhang - varunraokadaparthi - - christophermancini srep-functional-leads: - abyrne55 - clcollins diff --git a/boilerplate/_data/last-boilerplate-commit b/boilerplate/_data/last-boilerplate-commit index f5222b6f..afb18cd8 100644 --- a/boilerplate/_data/last-boilerplate-commit +++ b/boilerplate/_data/last-boilerplate-commit @@ -1 +1 @@ -d7285a904eda6cf842ddff8c648dedb223934a75 +b1c2b442985aaf395dde19b28fa5f139563eda05 diff --git a/boilerplate/_lib/container-make b/boilerplate/_lib/container-make index e847e3a8..77834586 100755 --- a/boilerplate/_lib/container-make +++ b/boilerplate/_lib/container-make @@ -4,6 +4,7 @@ if [[ "$1" == "-h"* ]] || [[ "$1" == "--h"* ]]; then echo "Usage: $0 {arguments to the real 'make'}" echo "Runs 'make' in the boilerplate backing container." echo "If the command fails, starts a shell in the container so you can debug." + echo "Set NONINTERACTIVE=true (or TRUE) to skip the debug shell and exit with the make return code." exit -1 fi @@ -40,12 +41,20 @@ banner "Running: make $@" $CONTAINER_ENGINE $args make "$@" rc=$? -# If it failed, drop into the container in a shell +# If it failed, check if we should drop into a shell or exit if [[ $rc -ne 0 ]]; then - banner "The 'make' command failed! Starting a shell in the container for debugging. Just 'exit' when done." - $CONTAINER_ENGINE $args /bin/bash + # Case-insensitive check for NONINTERACTIVE (true, TRUE, True all work) + if [[ "${NONINTERACTIVE,,}" == "true" ]]; then + banner "The 'make' command failed with exit code $rc. Skipping debug shell (NONINTERACTIVE=${NONINTERACTIVE})." + else + banner "The 'make' command failed! Starting a shell in the container for debugging. Just 'exit' when done." + $CONTAINER_ENGINE $args /bin/bash + fi fi # Finally, remove the container banner "Cleaning up the container" $CONTAINER_ENGINE rm -f $container_id >/dev/null + +# Exit with the return code from make +exit $rc diff --git a/boilerplate/openshift/golang-osd-e2e/update b/boilerplate/openshift/golang-osd-e2e/update index 1b4812f8..031e2c12 100755 --- a/boilerplate/openshift/golang-osd-e2e/update +++ b/boilerplate/openshift/golang-osd-e2e/update @@ -21,7 +21,7 @@ OPERATOR_NAME_CAMEL_CASE=${OPERATOR_PROPER_NAME// /} mkdir -p "${E2E_SUITE_DIRECTORY}" -E2E_SUITE_BUILDER_IMAGE=registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.24-openshift-4.20 +E2E_SUITE_BUILDER_IMAGE=registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.24-openshift-4.21 if [[ -n ${KONFLUX_BUILDS} ]]; then E2E_SUITE_BUILDER_IMAGE="brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.24" fi diff --git a/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES b/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES index 97fac934..ca5fda7f 100644 --- a/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES +++ b/boilerplate/openshift/golang-osd-operator/OWNERS_ALIASES @@ -5,7 +5,9 @@ aliases: srep-functional-team-aurora: - abyrne55 + - AlexSmithGH - dakotalongRH + - eth1030 - joshbranham - luis-falcon - reedcort @@ -65,7 +67,6 @@ aliases: - feichashao - samanthajayasinghe - xiaoyu74 - - Dee-6777 - Tessg22 - smarthall srep-infra-cicd: diff --git a/boilerplate/openshift/golang-osd-operator/standard.mk b/boilerplate/openshift/golang-osd-operator/standard.mk index a77c9e87..5bcf92b0 100644 --- a/boilerplate/openshift/golang-osd-operator/standard.mk +++ b/boilerplate/openshift/golang-osd-operator/standard.mk @@ -364,6 +364,7 @@ endif # Boilerplate container-make targets. # Runs 'make' in the boilerplate backing container. # If the command fails, starts a shell in the container so you can debug. +# Set NONINTERACTIVE=true to skip the debug shell for CI/automation. .PHONY: container-test container-test: ${BOILERPLATE_CONTAINER_MAKE} test @@ -384,6 +385,11 @@ container-validate: container-coverage: ${BOILERPLATE_CONTAINER_MAKE} coverage +# Run all container-* validation targets in sequence. +# Set NONINTERACTIVE=true to skip debug shells and fail fast for CI/automation. +.PHONY: container-all +container-all: container-lint container-generate container-coverage container-test container-validate + .PHONY: rvmo-bundle rvmo-bundle: RELEASE_BRANCH=$(RELEASE_BRANCH) \ diff --git a/build/Dockerfile b/build/Dockerfile index 2c3d31ad..833c2f3a 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -6,7 +6,7 @@ COPY . /osd-example-operator WORKDIR /osd-example-operator RUN make go-build -FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6-1758184547 +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1763362218 ENV OPERATOR=/usr/local/bin/osd-example-operator \ USER_UID=1001 \ USER_NAME=osd-example-operator diff --git a/build/Dockerfile.olm-registry b/build/Dockerfile.olm-registry index e3dcb110..9979b51f 100644 --- a/build/Dockerfile.olm-registry +++ b/build/Dockerfile.olm-registry @@ -4,7 +4,7 @@ COPY ${SAAS_OPERATOR_DIR} manifests RUN initializer --permissive # ubi-micro does not work for clusters with fips enabled unless we make OpenSSL available -FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6-1758184547 +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1763362218 COPY --from=builder /bin/registry-server /bin/registry-server COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe diff --git a/test/e2e/osd_example_operator_runner_test.go b/test/e2e/osd_example_operator_runner_test.go index ccd2a04e..32d9bcd3 100644 --- a/test/e2e/osd_example_operator_runner_test.go +++ b/test/e2e/osd_example_operator_runner_test.go @@ -4,7 +4,6 @@ package osde2etests import ( - "fmt" "os" "path/filepath" "testing" @@ -27,11 +26,3 @@ func TestOsdExampleOperator(t *testing.T) { } RunSpecs(t, "Osd Example Operator", suiteConfig, reporterConfig) } - -// Failing test case added on purpose -var _ = Describe("Intentional Failure Test", func() { - It("should fail on purpose", func() { - fmt.Println("Running Intentional Failure Test") - Expect(true).To(BeFalse(), "This test is designed to fail intentionally") - }) -}) diff --git a/test/e2e/osd_example_operator_tests.go b/test/e2e/osd_example_operator_tests.go index 71363c90..642405d2 100644 --- a/test/e2e/osd_example_operator_tests.go +++ b/test/e2e/osd_example_operator_tests.go @@ -5,7 +5,7 @@ package osde2etests import ( "context" - + "fmt" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -14,4 +14,10 @@ var _ = Describe("osd-example-operator", func() { It("asserts success", func(ctx context.Context) { Expect(true).To(BeTrue(), "True should be true") }) + + // Failing test for log analysis demo + It("should fail on purpose", func() { + fmt.Println("Running Intentional Failure Test") + Expect(true).To(BeFalse(), "This test is designed to fail intentionally") + }) })