From 9be684e93da737c63becb6fc53d43433d7b48023 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Mon, 29 Apr 2024 10:07:57 +0200 Subject: [PATCH 1/3] [qe] Use ubi8 image as builder for qe images As part of commit https://github.com/crc-org/crc/commit/ae4e57fea6881f4920c3dca397a165bf409d7092 we changed the e2e and integration images; as ubi9 based images were used to build the e2e and integration binaries those can not be executed on RHEL8 target hosts. This fix change the builders to use ubi8 based images Signed-off-by: Adrian Riobo Lorenzo --- images/build-e2e/Containerfile | 2 +- images/build-integration/Containerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/build-e2e/Containerfile b/images/build-e2e/Containerfile index 25160ba121..94aaa7634c 100644 --- a/images/build-e2e/Containerfile +++ b/images/build-e2e/Containerfile @@ -1,5 +1,5 @@ -FROM registry.access.redhat.com/ubi9/go-toolset:1.20 AS builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.20 AS builder USER root diff --git a/images/build-integration/Containerfile b/images/build-integration/Containerfile index 6eda99fd71..ca498f963a 100644 --- a/images/build-integration/Containerfile +++ b/images/build-integration/Containerfile @@ -1,5 +1,5 @@ -FROM registry.access.redhat.com/ubi9/go-toolset:1.20 AS builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.20 AS builder USER root From d2eb3d720cf96a631e98d100c44d5dffc9a9d334 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Mon, 29 Apr 2024 10:10:45 +0200 Subject: [PATCH 2/3] [qe] fix integration image scripts The scripts used to run the integration tests require to set several environment variables to customize the execution; the way the script try to set them and run the integration binary inheriting them was not right. This fix export those variables and execute the integration binary properly Signed-off-by: Adrian Riobo Lorenzo --- images/build-integration/lib/darwin/run.sh | 8 ++++---- images/build-integration/lib/linux/run.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/images/build-integration/lib/darwin/run.sh b/images/build-integration/lib/darwin/run.sh index 4665cca7f5..d8346eacf1 100755 --- a/images/build-integration/lib/darwin/run.sh +++ b/images/build-integration/lib/darwin/run.sh @@ -32,14 +32,14 @@ done mkdir -p $targetFolder/results # Run tests -PATH="$PATH:${HOME}/$targetFolder/bin" -PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" +export PATH="$PATH:${HOME}/$targetFolder/bin" +export PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" if [ ! -z "$bundleLocation" ] then - BUNDLE_PATH="$bundleLocation" + export BUNDLE_PATH="$bundleLocation" fi cd $targetFolder/bin -. integration.test > integration.results +./integration.test > integration.results # Copy results cd .. diff --git a/images/build-integration/lib/linux/run.sh b/images/build-integration/lib/linux/run.sh index 4665cca7f5..d8346eacf1 100755 --- a/images/build-integration/lib/linux/run.sh +++ b/images/build-integration/lib/linux/run.sh @@ -32,14 +32,14 @@ done mkdir -p $targetFolder/results # Run tests -PATH="$PATH:${HOME}/$targetFolder/bin" -PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" +export PATH="$PATH:${HOME}/$targetFolder/bin" +export PULL_SECRET_PATH="${HOME}/$targetFolder/pull-secret" if [ ! -z "$bundleLocation" ] then - BUNDLE_PATH="$bundleLocation" + export BUNDLE_PATH="$bundleLocation" fi cd $targetFolder/bin -. integration.test > integration.results +./integration.test > integration.results # Copy results cd .. From c99500cabd09be7fb49ec6c4285fdee45dce69a9 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Mon, 29 Apr 2024 10:11:50 +0200 Subject: [PATCH 3/3] [qe] change the httpd image used within e2e to registry.access.redhat.com/ubi8/httpd-24:latest This image was partially used within e2e, now we extend its usage to all the remainig places Signed-off-by: Adrian Riobo Lorenzo --- test/e2e/features/story_openshift.feature | 4 ++-- test/e2e/testsuite/testsuite.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/features/story_openshift.feature b/test/e2e/features/story_openshift.feature index 8d0bab8484..3419f87ac9 100644 --- a/test/e2e/features/story_openshift.feature +++ b/test/e2e/features/story_openshift.feature @@ -41,7 +41,7 @@ Feature: 4 Openshift stories Given executing "oc new-project testproj" succeeds # mirror When executing "oc registry login --insecure=true" succeeds - Then executing "oc image mirror quay.io/centos7/httpd-24-centos7:centos7=default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test --insecure=true --filter-by-os=linux/amd64" succeeds + Then executing "oc image mirror registry.access.redhat.com/ubi8/httpd-24:latest=default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test --insecure=true --filter-by-os=linux/amd64" succeeds And executing "oc set image-lookup hello" succeeds # deploy When executing "oc apply -f hello.yaml" succeeds @@ -56,7 +56,7 @@ Feature: 4 Openshift stories Scenario: Pull image locally, push to registry, deploy Given podman command is available And executing "oc new-project testproj" succeeds - When pulling image "quay.io/centos7/httpd-24-centos7:centos7", logging in, and pushing local image to internal registry succeeds + When pulling image "registry.access.redhat.com/ubi8/httpd-24:latest", logging in, and pushing local image to internal registry succeeds And executing "oc apply -f hello.yaml" succeeds When executing "oc rollout status deployment hello" succeeds Then stdout should contain "successfully rolled out" diff --git a/test/e2e/testsuite/testsuite.go b/test/e2e/testsuite/testsuite.go index 400a8e3e90..75a430d735 100644 --- a/test/e2e/testsuite/testsuite.go +++ b/test/e2e/testsuite/testsuite.go @@ -996,7 +996,7 @@ func PullLoginTagPushImageSucceeds(image string) error { return err } - _, err = cmd.RunPodmanExpectSuccess("push", "default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test", "--tls-verify=false") + _, err = cmd.RunPodmanExpectSuccess("push", "default-route-openshift-image-registry.apps-crc.testing/testproj/hello:test", "--remove-signatures", "--tls-verify=false") if err != nil { return err }