From 6378a7865b50249403d62a4f6824f584fac65314 Mon Sep 17 00:00:00 2001 From: Amber Brown Date: Tue, 18 Jul 2023 09:58:31 +1000 Subject: [PATCH 1/2] try and run in container --- .pipelines/e2e.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.pipelines/e2e.yml b/.pipelines/e2e.yml index 90edc5c18ed..f575c6c23e8 100644 --- a/.pipelines/e2e.yml +++ b/.pipelines/e2e.yml @@ -30,7 +30,7 @@ jobs: - script: | set -xe sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - sudo dnf install -y openvpn make podman + sudo dnf install -y openvpn make podman jq displayName: Setup (Container) target: container @@ -79,8 +79,10 @@ jobs: displayName: Execute Tests target: container + # must-gather collection must be run inside the container so it can access the VPN - script: | export CI=true + . secrets/env . ./hack/e2e/run-rp-and-e2e.sh hack/get-admin-kubeconfig.sh /subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$CLUSTER/providers/Microsoft.RedHatOpenShift/openShiftClusters/$CLUSTER >admin.kubeconfig @@ -91,6 +93,7 @@ jobs: ./oc adm must-gather tar cf must-gather.tar.gz must-gather.local.* displayName: Collect must-gather + target: container condition: failed() - publish: must-gather.tar.gz artifact: must-gather From 8c8f450a41e5be7ab318c56f0f3833a284161ab9 Mon Sep 17 00:00:00 2001 From: Amber Brown Date: Tue, 18 Jul 2023 12:54:22 +1000 Subject: [PATCH 2/2] cleanup --- .pipelines/e2e.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.pipelines/e2e.yml b/.pipelines/e2e.yml index f575c6c23e8..068d2b60df1 100644 --- a/.pipelines/e2e.yml +++ b/.pipelines/e2e.yml @@ -79,13 +79,17 @@ jobs: displayName: Execute Tests target: container - # must-gather collection must be run inside the container so it can access the VPN - script: | export CI=true - . secrets/env . ./hack/e2e/run-rp-and-e2e.sh hack/get-admin-kubeconfig.sh /subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$CLUSTER/providers/Microsoft.RedHatOpenShift/openShiftClusters/$CLUSTER >admin.kubeconfig + displayName: Get admin kubeconfig for must-gather + condition: failed() + # must-gather collection must be run inside the container so it can access the VPN + - script: | + export CI=true + . ./hack/e2e/run-rp-and-e2e.sh export KUBECONFIG=admin.kubeconfig wget -nv https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/$(OpenShiftVersion)/openshift-client-linux-$(OpenShiftVersion).tar.gz