From e887ac9e4f9ea56ac941aa8487dcfeaa727fe592 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Thu, 23 Mar 2023 17:25:52 +0100 Subject: [PATCH 01/25] microshift-e2e --- .../microshift/openshift-microshift-main.yaml | 19 ++ .../openshift-microshift-main-presubmits.yaml | 162 ++++++++++++++++++ .../microshift/e2e/microshift-tests/OWNERS | 1 + ...t-e2e-microshift-tests-chain.metadata.json | 33 ++++ ...microshift-e2e-microshift-tests-chain.yaml | 4 + ...icroshift-e2e-microshift-tests-commands.sh | 42 +++++ ...ift-e2e-microshift-tests-ref.metadata.json | 33 ++++ ...t-microshift-e2e-microshift-tests-ref.yaml | 16 ++ ...2e-microshift-tests-workflow.metadata.json | 33 ++++ ...roshift-e2e-microshift-tests-workflow.yaml | 10 ++ 10 files changed, 353 insertions(+) create mode 120000 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/OWNERS create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml index da5c2bc72543e..d1308e015a1c0 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml @@ -228,6 +228,25 @@ tests: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 workflow: openshift-microshift-e2e-loadbalancer-smoke-test +- as: e2e-microshift-tests + cluster: build02 + optional: true + run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) + steps: + cluster_profile: gcp + env: + GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 + workflow: openshift-microshift-e2e-microshift-tests +- as: e2e-microshift-tests-arm + cluster: build02 + optional: true + run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) + steps: + cluster_profile: gcp + env: + GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 + GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 + workflow: openshift-microshift-e2e-microshift-tests zz_generated_metadata: branch: main org: openshift diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml index 88a541b366ad8..8d90bafbf8a9a 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml @@ -324,6 +324,168 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-loadbalancer-smoke-test-arm,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build02 + context: ci/prow/e2e-microshift-tests + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/cloud: gcp + ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cluster: build02 + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-microshift-main-e2e-microshift-tests + optional: true + rerun_command: /test e2e-microshift-tests + run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --secret-dir=/usr/local/e2e-microshift-tests-cluster-profile + - --target=e2e-microshift-tests + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /usr/local/e2e-microshift-tests-cluster-profile + name: cluster-profile + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-gcp + - configMap: + name: cluster-profile-gcp + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-microshift-tests,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build02 + context: ci/prow/e2e-microshift-tests-arm + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/cloud: gcp + ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cluster: build02 + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-microshift-main-e2e-microshift-tests-arm + optional: true + rerun_command: /test e2e-microshift-tests-arm + run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --secret-dir=/usr/local/e2e-microshift-tests-arm-cluster-profile + - --target=e2e-microshift-tests-arm + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /usr/local/e2e-microshift-tests-arm-cluster-profile + name: cluster-profile + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-gcp + - configMap: + name: cluster-profile-gcp + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-microshift-tests-arm,?($|\s.*) - agent: kubernetes always_run: false branches: diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/OWNERS b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/OWNERS new file mode 120000 index 0000000000000..8c272259fbba9 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/OWNERS @@ -0,0 +1 @@ +../../OWNERS \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json new file mode 100644 index 0000000000000..cfecbfa7da8c2 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json @@ -0,0 +1,33 @@ +{ + "path": "openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.yaml", + "owners": { + "approvers": [ + "benluddy", + "copejon", + "dhellmann", + "fzdarsky", + "ggiguash", + "mangelajo", + "oglok", + "pacevedom", + "pmtk", + "sallyom", + "stlaz", + "zshi-redhat" + ], + "reviewers": [ + "benluddy", + "copejon", + "dhellmann", + "fzdarsky", + "ggiguash", + "mangelajo", + "oglok", + "pacevedom", + "pmtk", + "sallyom", + "stlaz", + "zshi-redhat" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.yaml b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.yaml new file mode 100644 index 0000000000000..c198ebdeca8ff --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.yaml @@ -0,0 +1,4 @@ +chain: + as: openshift-microshift-e2e-microshift-tests + steps: + - ref: openshift-microshift-e2e-microshift-tests diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh new file mode 100644 index 0000000000000..996d993379e85 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' +set -x + +trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM + +INSTANCE_PREFIX="${NAMESPACE}-${JOB_NAME_HASH}" +GOOGLE_PROJECT_ID=$(<"${CLUSTER_PROFILE_DIR}/openshift_gcp_project") +GOOGLE_COMPUTE_REGION="${LEASED_RESOURCE}" +GOOGLE_COMPUTE_ZONE=$(<"${SHARED_DIR}/openshift_gcp_compute_zone") +if [[ -z "${GOOGLE_COMPUTE_ZONE}" ]]; then + echo "Expected \${SHARED_DIR}/openshift_gcp_compute_zone to contain the GCP zone" + exit 1 +fi + +export INSTANCE_PREFIX +export GOOGLE_PROJECT_ID +export GOOGLE_COMPUTE_REGION +export GOOGLE_COMPUTE_ZONE + +mkdir -p "${HOME}"/.ssh + +# gcloud compute will use this key rather than create a new one +cp "${CLUSTER_PROFILE_DIR}"/ssh-privatekey "${HOME}"/.ssh/google_compute_engine +chmod 0600 "${HOME}"/.ssh/google_compute_engine +cp "${CLUSTER_PROFILE_DIR}"/ssh-publickey "${HOME}"/.ssh/google_compute_engine.pub +echo 'ServerAliveInterval 30' | tee -a "${HOME}"/.ssh/config +echo 'ServerAliveCountMax 1200' | tee -a "${HOME}"/.ssh/config +chmod 0600 "${HOME}"/.ssh/config + +#cp "${CLUSTER_PROFILE_DIR}"/pull-secret "${HOME}"/pull-secret + +gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}"/gce.json +gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" +gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" +gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" + +cd /tmp +git clone https://github.com/pmtk/microshift.git --branch merge-e2e-tests +./microshift/e2e/main.sh diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json new file mode 100644 index 0000000000000..9964bd4196ef8 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json @@ -0,0 +1,33 @@ +{ + "path": "openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml", + "owners": { + "approvers": [ + "benluddy", + "copejon", + "dhellmann", + "fzdarsky", + "ggiguash", + "mangelajo", + "oglok", + "pacevedom", + "pmtk", + "sallyom", + "stlaz", + "zshi-redhat" + ], + "reviewers": [ + "benluddy", + "copejon", + "dhellmann", + "fzdarsky", + "ggiguash", + "mangelajo", + "oglok", + "pacevedom", + "pmtk", + "sallyom", + "stlaz", + "zshi-redhat" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml new file mode 100644 index 0000000000000..7039d5669e450 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml @@ -0,0 +1,16 @@ +ref: + as: openshift-microshift-e2e-microshift-tests + from: microshift-test-payload + commands: openshift-microshift-e2e-microshift-tests-commands.sh + resources: + requests: + cpu: 100m + memory: 90Mi + grace_period: 10m + env: + - name: HOME + default: /tmp/secret + credentials: + - namespace: test-credentials + name: microshift-rhsm-creds + mount_path: /var/run/rhsm/ diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json new file mode 100644 index 0000000000000..340e4a17146dc --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json @@ -0,0 +1,33 @@ +{ + "path": "openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.yaml", + "owners": { + "approvers": [ + "benluddy", + "copejon", + "dhellmann", + "fzdarsky", + "ggiguash", + "mangelajo", + "oglok", + "pacevedom", + "pmtk", + "sallyom", + "stlaz", + "zshi-redhat" + ], + "reviewers": [ + "benluddy", + "copejon", + "dhellmann", + "fzdarsky", + "ggiguash", + "mangelajo", + "oglok", + "pacevedom", + "pmtk", + "sallyom", + "stlaz", + "zshi-redhat" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.yaml b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.yaml new file mode 100644 index 0000000000000..2ff4d243dc1fc --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.yaml @@ -0,0 +1,10 @@ +workflow: + as: openshift-microshift-e2e-microshift-tests + steps: + allow_best_effort_post_steps: true + pre: + - chain: openshift-microshift-infra-pre + test: + - chain: openshift-microshift-e2e-microshift-tests + post: + - chain: openshift-microshift-infra-post From 8f6c17eb58d05ef2355d428b539975392256f066 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:45:12 +0200 Subject: [PATCH 02/25] provide firewall functions --- ...icroshift-e2e-microshift-tests-commands.sh | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index 996d993379e85..26075b41d80d8 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -22,7 +22,6 @@ export GOOGLE_COMPUTE_ZONE mkdir -p "${HOME}"/.ssh -# gcloud compute will use this key rather than create a new one cp "${CLUSTER_PROFILE_DIR}"/ssh-privatekey "${HOME}"/.ssh/google_compute_engine chmod 0600 "${HOME}"/.ssh/google_compute_engine cp "${CLUSTER_PROFILE_DIR}"/ssh-publickey "${HOME}"/.ssh/google_compute_engine.pub @@ -30,13 +29,36 @@ echo 'ServerAliveInterval 30' | tee -a "${HOME}"/.ssh/config echo 'ServerAliveCountMax 1200' | tee -a "${HOME}"/.ssh/config chmod 0600 "${HOME}"/.ssh/config -#cp "${CLUSTER_PROFILE_DIR}"/pull-secret "${HOME}"/pull-secret - gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}"/gce.json gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" +firewall::open_port() { + local port="${1}" + local protocol="${2:-tcp}" + gcloud compute firewall-rules create "microshift-${INSTANCE_PREFIX}-${protocol}-${port}" --network "${INSTANCE_PREFIX}" --allow "${protocol}:${port}" +} + +firewall::close_port() { + local port="$1" + local protocol="${2:-tcp}" + gcloud compute firewall-rules delete "microshift-${INSTANCE_PREFIX}-${protocol}-${port}" +} + +export -f firewall::open_port +export -f firewall::close_port + +IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" +gcloud compute --project "${GOOGLE_PROJECT_ID}" ssh \ + --zone "${GOOGLE_COMPUTE_ZONE}" \ + rhel8user@"${INSTANCE_PREFIX}" \ + --command "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig + cd /tmp git clone https://github.com/pmtk/microshift.git --branch merge-e2e-tests -./microshift/e2e/main.sh + +KUBECONFIG=/tmp/kubeconfig \ + USHIFT_IP="${IP_ADDRESS}" \ + USHIFT_USER=microshift \ + ./microshift/e2e/main.sh From 37298d2085d1b075da3daa3eb0ad4effcc78c4c2 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:34:38 +0200 Subject: [PATCH 03/25] add cli --- .../openshift-microshift-e2e-microshift-tests-ref.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml index 7039d5669e450..2339c3d126b54 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml @@ -1,5 +1,6 @@ ref: as: openshift-microshift-e2e-microshift-tests + cli: latest from: microshift-test-payload commands: openshift-microshift-e2e-microshift-tests-commands.sh resources: From c042bb39df8f9890edc6234234ca9ada3a417bd4 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:49:48 +0200 Subject: [PATCH 04/25] use user that's configured for ssh --- .../openshift-microshift-e2e-microshift-tests-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index 26075b41d80d8..1deab11c4741e 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -60,5 +60,5 @@ git clone https://github.com/pmtk/microshift.git --branch merge-e2e-tests KUBECONFIG=/tmp/kubeconfig \ USHIFT_IP="${IP_ADDRESS}" \ - USHIFT_USER=microshift \ + USHIFT_USER=rhel8user \ ./microshift/e2e/main.sh From d7c7297087c100e8ae09c0a87a32ca3ba032083b Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 31 Mar 2023 10:49:10 +0200 Subject: [PATCH 05/25] setup openssh client --- ...icroshift-e2e-microshift-tests-commands.sh | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index 1deab11c4741e..dd189b61e0dc1 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -15,25 +15,32 @@ if [[ -z "${GOOGLE_COMPUTE_ZONE}" ]]; then exit 1 fi -export INSTANCE_PREFIX -export GOOGLE_PROJECT_ID -export GOOGLE_COMPUTE_REGION -export GOOGLE_COMPUTE_ZONE - mkdir -p "${HOME}"/.ssh +cp "${CLUSTER_PROFILE_DIR}/ssh-privatekey" "${HOME}/.ssh/google_compute_engine" +chmod 0600 "${HOME}/.ssh/google_compute_engine" +cp "${CLUSTER_PROFILE_DIR}/ssh-publickey" "${HOME}/.ssh/google_compute_engine.pub" -cp "${CLUSTER_PROFILE_DIR}"/ssh-privatekey "${HOME}"/.ssh/google_compute_engine -chmod 0600 "${HOME}"/.ssh/google_compute_engine -cp "${CLUSTER_PROFILE_DIR}"/ssh-publickey "${HOME}"/.ssh/google_compute_engine.pub -echo 'ServerAliveInterval 30' | tee -a "${HOME}"/.ssh/config -echo 'ServerAliveCountMax 1200' | tee -a "${HOME}"/.ssh/config -chmod 0600 "${HOME}"/.ssh/config +cat <"${HOME}/.ssh/config" +Host * + IdentityFile ~/.ssh/google_compute_engine + ServerAliveInterval 30 + ServerAliveCountMax 1200 +EOF +chmod 0600 "${HOME}/.ssh/config" -gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}"/gce.json +gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}/gce.json" gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" +gcloud compute ssh \ + --project "${GOOGLE_PROJECT_ID}" --zone "${GOOGLE_COMPUTE_ZONE}" \ + "rhel8user@${INSTANCE_PREFIX}" --command "ls ~/.ssh/" + +gcloud compute ssh \ + --project "${GOOGLE_PROJECT_ID}" --zone "${GOOGLE_COMPUTE_ZONE}" \ + "rhel8user@${INSTANCE_PREFIX}" --command "cat ~/.ssh/*.pub" >>~/.ssh/known_hosts + firewall::open_port() { local port="${1}" local protocol="${2:-tcp}" @@ -50,10 +57,12 @@ export -f firewall::open_port export -f firewall::close_port IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" -gcloud compute --project "${GOOGLE_PROJECT_ID}" ssh \ - --zone "${GOOGLE_COMPUTE_ZONE}" \ - rhel8user@"${INSTANCE_PREFIX}" \ - --command "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig +# gcloud compute --project "${GOOGLE_PROJECT_ID}" ssh \ +# --zone "${GOOGLE_COMPUTE_ZONE}" \ +# rhel8user@"${INSTANCE_PREFIX}" \ +# --command "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig + +ssh "rhel8user@${IP_ADDRESS}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig cd /tmp git clone https://github.com/pmtk/microshift.git --branch merge-e2e-tests From 54d6c27c30e131d3287f30422bac81d27274304b Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 31 Mar 2023 13:15:27 +0200 Subject: [PATCH 06/25] try handling ssh keys another way --- ...t-microshift-e2e-microshift-tests-commands.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index dd189b61e0dc1..8c013dba35694 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -15,6 +15,11 @@ if [[ -z "${GOOGLE_COMPUTE_ZONE}" ]]; then exit 1 fi +gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}/gce.json" +gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" +gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" +gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" + mkdir -p "${HOME}"/.ssh cp "${CLUSTER_PROFILE_DIR}/ssh-privatekey" "${HOME}/.ssh/google_compute_engine" chmod 0600 "${HOME}/.ssh/google_compute_engine" @@ -28,18 +33,13 @@ Host * EOF chmod 0600 "${HOME}/.ssh/config" -gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}/gce.json" -gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" -gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" -gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" - gcloud compute ssh \ --project "${GOOGLE_PROJECT_ID}" --zone "${GOOGLE_COMPUTE_ZONE}" \ - "rhel8user@${INSTANCE_PREFIX}" --command "ls ~/.ssh/" - + "rhel8user@${INSTANCE_PREFIX}" --command "cat ~/.ssh/authorized_keys" +PUB_KEY="$(cat "${HOME}/.ssh/google_compute_engine.pub")" gcloud compute ssh \ --project "${GOOGLE_PROJECT_ID}" --zone "${GOOGLE_COMPUTE_ZONE}" \ - "rhel8user@${INSTANCE_PREFIX}" --command "cat ~/.ssh/*.pub" >>~/.ssh/known_hosts + "rhel8user@${INSTANCE_PREFIX}" --command "echo $PUB_KEY >> ~/.ssh/authorized_keys" firewall::open_port() { local port="${1}" From ef615bc5f740ffeee0b83eb5f5c752874b2e35e7 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:15:34 +0200 Subject: [PATCH 07/25] best debug method known to men --- .../openshift-microshift-e2e-microshift-tests-commands.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index 8c013dba35694..f814c47fc81f7 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -62,6 +62,8 @@ IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='g # rhel8user@"${INSTANCE_PREFIX}" \ # --command "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig +sleep 60m + ssh "rhel8user@${IP_ADDRESS}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig cd /tmp From 00c2e446e4d5fc7947d65da56f5a71d0039b3fbc Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:48:12 +0200 Subject: [PATCH 08/25] get remote host pubkey --- ...icroshift-e2e-microshift-tests-commands.sh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index f814c47fc81f7..7c37e4dad60a1 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -15,6 +15,8 @@ if [[ -z "${GOOGLE_COMPUTE_ZONE}" ]]; then exit 1 fi +IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" + gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}/gce.json" gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" @@ -26,7 +28,7 @@ chmod 0600 "${HOME}/.ssh/google_compute_engine" cp "${CLUSTER_PROFILE_DIR}/ssh-publickey" "${HOME}/.ssh/google_compute_engine.pub" cat <"${HOME}/.ssh/config" -Host * +Host ${IP_ADDRESS} IdentityFile ~/.ssh/google_compute_engine ServerAliveInterval 30 ServerAliveCountMax 1200 @@ -35,11 +37,8 @@ chmod 0600 "${HOME}/.ssh/config" gcloud compute ssh \ --project "${GOOGLE_PROJECT_ID}" --zone "${GOOGLE_COMPUTE_ZONE}" \ - "rhel8user@${INSTANCE_PREFIX}" --command "cat ~/.ssh/authorized_keys" -PUB_KEY="$(cat "${HOME}/.ssh/google_compute_engine.pub")" -gcloud compute ssh \ - --project "${GOOGLE_PROJECT_ID}" --zone "${GOOGLE_COMPUTE_ZONE}" \ - "rhel8user@${INSTANCE_PREFIX}" --command "echo $PUB_KEY >> ~/.ssh/authorized_keys" + "rhel8user@${INSTANCE_PREFIX}" \ + --command "cat /etc/ssh/ssh_host_*_key.pub" | cut -d' ' -f1,2 | sed "s,^,${IP_ADDRESS} ," >>~/.ssh/known_hosts firewall::open_port() { local port="${1}" @@ -56,14 +55,6 @@ firewall::close_port() { export -f firewall::open_port export -f firewall::close_port -IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" -# gcloud compute --project "${GOOGLE_PROJECT_ID}" ssh \ -# --zone "${GOOGLE_COMPUTE_ZONE}" \ -# rhel8user@"${INSTANCE_PREFIX}" \ -# --command "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig - -sleep 60m - ssh "rhel8user@${IP_ADDRESS}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig cd /tmp From b0f6d1c97d8c26595c58e1741d288a2e655d8636 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 31 Mar 2023 16:41:56 +0200 Subject: [PATCH 09/25] move getting IP to correct place --- .../openshift-microshift-e2e-microshift-tests-commands.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index 7c37e4dad60a1..eec96b9f8b4a3 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -15,13 +15,13 @@ if [[ -z "${GOOGLE_COMPUTE_ZONE}" ]]; then exit 1 fi -IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" - gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}/gce.json" gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" +IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" + mkdir -p "${HOME}"/.ssh cp "${CLUSTER_PROFILE_DIR}/ssh-privatekey" "${HOME}/.ssh/google_compute_engine" chmod 0600 "${HOME}/.ssh/google_compute_engine" From 48f95954979c97165176d3010745f6107e0a3257 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 31 Mar 2023 17:31:14 +0200 Subject: [PATCH 10/25] export INSTANCE_PREFIX to use with firewall funcs --- .../openshift-microshift-e2e-microshift-tests-commands.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index eec96b9f8b4a3..a1f3834b41fbc 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -54,6 +54,7 @@ firewall::close_port() { export -f firewall::open_port export -f firewall::close_port +export INSTANCE_PREFIX ssh "rhel8user@${IP_ADDRESS}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig From 1b1fb5662d53859b4207aa9edf3e9687be3c356f Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 31 Mar 2023 17:37:50 +0200 Subject: [PATCH 11/25] rebase owners --- ...ft-e2e-microshift-tests-chain.metadata.json | 18 ++++-------------- ...hift-e2e-microshift-tests-ref.metadata.json | 18 ++++-------------- ...e2e-microshift-tests-workflow.metadata.json | 18 ++++-------------- 3 files changed, 12 insertions(+), 42 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json index cfecbfa7da8c2..e7cc2c204aba0 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.metadata.json @@ -2,32 +2,22 @@ "path": "openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-chain.yaml", "owners": { "approvers": [ - "benluddy", + "chiragkyal", "copejon", "dhellmann", - "fzdarsky", + "eggfoobar", "ggiguash", - "mangelajo", - "oglok", "pacevedom", + "pliurh", "pmtk", - "sallyom", - "stlaz", "zshi-redhat" ], "reviewers": [ - "benluddy", "copejon", "dhellmann", - "fzdarsky", "ggiguash", - "mangelajo", - "oglok", "pacevedom", - "pmtk", - "sallyom", - "stlaz", - "zshi-redhat" + "pmtk" ] } } \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json index 9964bd4196ef8..8eebef792243a 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.metadata.json @@ -2,32 +2,22 @@ "path": "openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-ref.yaml", "owners": { "approvers": [ - "benluddy", + "chiragkyal", "copejon", "dhellmann", - "fzdarsky", + "eggfoobar", "ggiguash", - "mangelajo", - "oglok", "pacevedom", + "pliurh", "pmtk", - "sallyom", - "stlaz", "zshi-redhat" ], "reviewers": [ - "benluddy", "copejon", "dhellmann", - "fzdarsky", "ggiguash", - "mangelajo", - "oglok", "pacevedom", - "pmtk", - "sallyom", - "stlaz", - "zshi-redhat" + "pmtk" ] } } \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json index 340e4a17146dc..b4bc89c90e376 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.metadata.json @@ -2,32 +2,22 @@ "path": "openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-workflow.yaml", "owners": { "approvers": [ - "benluddy", + "chiragkyal", "copejon", "dhellmann", - "fzdarsky", + "eggfoobar", "ggiguash", - "mangelajo", - "oglok", "pacevedom", + "pliurh", "pmtk", - "sallyom", - "stlaz", "zshi-redhat" ], "reviewers": [ - "benluddy", "copejon", "dhellmann", - "fzdarsky", "ggiguash", - "mangelajo", - "oglok", "pacevedom", - "pmtk", - "sallyom", - "stlaz", - "zshi-redhat" + "pmtk" ] } } \ No newline at end of file From 7c9d4e856eb4a1c0e154759e33f9405f267f0a79 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:26:39 +0200 Subject: [PATCH 12/25] python test runner --- .../openshift-microshift-e2e-microshift-tests-commands.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index a1f3834b41fbc..eef097de769a0 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -56,12 +56,7 @@ export -f firewall::open_port export -f firewall::close_port export INSTANCE_PREFIX -ssh "rhel8user@${IP_ADDRESS}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig - cd /tmp git clone https://github.com/pmtk/microshift.git --branch merge-e2e-tests -KUBECONFIG=/tmp/kubeconfig \ - USHIFT_IP="${IP_ADDRESS}" \ - USHIFT_USER=rhel8user \ - ./microshift/e2e/main.sh +./microshift/e2e/main.py run --host "${IP_ADDRESS}" --user rhel8user From 47f9c205aa14d88613ca4f54dfc9fefa240b6557 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:47:37 +0200 Subject: [PATCH 13/25] bring back bash test runner --- .../openshift-microshift-e2e-microshift-tests-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index eef097de769a0..233bacb967325 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -59,4 +59,4 @@ export INSTANCE_PREFIX cd /tmp git clone https://github.com/pmtk/microshift.git --branch merge-e2e-tests -./microshift/e2e/main.py run --host "${IP_ADDRESS}" --user rhel8user +USHIFT_IP="${IP_ADDRESS}" USHIFT_USER=rhel8user ./microshift/e2e/main.sh run From b9785d46e3905ba16582de21729ff90c8c29f686 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Wed, 12 Apr 2023 08:42:26 +0200 Subject: [PATCH 14/25] use from o/m --- .../openshift-microshift-e2e-microshift-tests-commands.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index 233bacb967325..3e656df93ea0f 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -56,7 +56,4 @@ export -f firewall::open_port export -f firewall::close_port export INSTANCE_PREFIX -cd /tmp -git clone https://github.com/pmtk/microshift.git --branch merge-e2e-tests - USHIFT_IP="${IP_ADDRESS}" USHIFT_USER=rhel8user ./microshift/e2e/main.sh run From 1b79f1c5adc3e5793270e539f014abccd73b4878 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:24:22 +0200 Subject: [PATCH 15/25] changes to accomodate e2e and getting carried away --- .../microshift/openshift-microshift-main.yaml | 105 +-- .../openshift-microshift-release-4.12.yaml | 21 +- .../openshift-microshift-release-4.13.yaml | 23 +- .../openshift-microshift-release-4.14.yaml | 86 +-- .../openshift-microshift-release-4.15.yaml | 86 +-- .../openshift-microshift-main-presubmits.yaml | 688 +----------------- ...ft-microshift-release-4.14-presubmits.yaml | 526 +------------ ...ft-microshift-release-4.15-presubmits.yaml | 528 +------------- ...shift-microshift-e2e-greenboot-commands.sh | 3 +- ...ft-e2e-loadbalancer-smoke-test-commands.sh | 3 +- ...icroshift-e2e-microshift-tests-commands.sh | 25 +- ...-openshift-conformance-reduced-commands.sh | 4 +- ...ft-microshift-e2e-reboot-tests-commands.sh | 14 +- ...oshift-e2e-reboot-tests-verify-commands.sh | 72 +- ...croshift-e2e-router-smoke-test-commands.sh | 3 +- .../openshift-microshift-e2e-test-commands.sh | 2 +- ...t-microshift-infra-rpm-install-commands.sh | 58 +- ...hift-infra-wait-for-cluster-up-commands.sh | 2 +- .../openshift-microshift-rebase-commands.sh | 5 + 19 files changed, 179 insertions(+), 2075 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml index d1308e015a1c0..e9cad9661f74c 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-main.yaml @@ -38,22 +38,15 @@ images: FROM src as rpms RUN dnf install --setopt=tsflags=nodocs -y selinux-policy-devel RUN make rpm && TARGET_ARCH=aarch64 make rpm + RUN tar cvf /rpms.tar -C _output/rpmbuild/RPMS/ . FROM test-runtime - USER root - ENV HOME=/tmp/secret - ENV PAYLOAD_PATH=$HOME/payload - WORKDIR $PAYLOAD_PATH - COPY oc openshift-tests usr/bin/ - RUN chmod 755 usr/bin/oc && ln -rs usr/bin/oc usr/bin/kubectl + COPY oc openshift-tests /usr/bin/ + RUN ln -rs /usr/bin/oc /usr/bin/kubectl - COPY validate-microshift /tmp/validate-microshift - COPY busybox_running_check.sh configure-vm.sh usr/bin/ - RUN chmod 755 usr/bin/configure-vm.sh usr/bin/busybox_running_check.sh - - COPY --from=rpms /go/src/github.com/openshift/microshift/_output/rpmbuild/RPMS/*/*.rpm packages/ - RUN tar -cvf payload.tar . && chmod -R a+rw "${HOME}" + COPY microshift /microshift + COPY --from=rpms /rpms.tar /rpms.tar inputs: cli: paths: @@ -64,12 +57,6 @@ images: - src paths: - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/scripts/devenv-builder/configure-vm.sh - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/validate-microshift - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/docs/config/busybox_running_check.sh - - destination_dir: ./microshift source_path: /go/src/github.com/openshift/microshift test-bin: paths: @@ -150,43 +137,7 @@ tests: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 workflow: openshift-microshift-e2e-openshift-conformance-reduced -- as: e2e-reboot - cluster: build02 - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-reboot-tests -- as: e2e-reboot-arm - cluster: build02 - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-reboot-tests -- as: e2e-greenboot - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-greenboot -- as: e2e-greenboot-arm - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-greenboot -- as: e2e-router-smoke-test +- as: microshift-e2e cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -194,8 +145,8 @@ tests: cluster_profile: gcp env: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-router-smoke-test -- as: e2e-router-smoke-test-arm + workflow: openshift-microshift-e2e-microshift-tests +- as: microshift-e2e-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -204,49 +155,11 @@ tests: env: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-router-smoke-test + workflow: openshift-microshift-e2e-microshift-tests - as: rebase-on-nightlies cron: 0 5 * * 1-5 steps: workflow: openshift-microshift-rebase -- as: e2e-loadbalancer-smoke-test - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test -- as: e2e-loadbalancer-smoke-test-arm - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test -- as: e2e-microshift-tests - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-microshift-tests -- as: e2e-microshift-tests-arm - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-microshift-tests zz_generated_metadata: branch: main org: openshift diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml index c133dc3610eee..8800f0e548995 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.12.yaml @@ -38,22 +38,15 @@ images: FROM src as rpms RUN dnf install --setopt=tsflags=nodocs -y selinux-policy-devel RUN make rpm + RUN tar cvf /rpms.tar -C _output/rpmbuild/RPMS/ . FROM test-runtime - USER root - ENV HOME=/tmp/secret - ENV PAYLOAD_PATH=$HOME/payload - WORKDIR $PAYLOAD_PATH - COPY oc openshift-tests usr/bin/ - RUN chmod 755 usr/bin/oc && ln -rs usr/bin/oc usr/bin/kubectl + COPY oc openshift-tests /usr/bin/ + RUN ln -rs /usr/bin/oc /usr/bin/kubectl - COPY validate-microshift /tmp/validate-microshift - COPY configure-vm.sh usr/bin/ - RUN chmod 755 usr/bin/configure-vm.sh - - COPY --from=rpms /go/src/github.com/openshift/microshift/_output/rpmbuild/RPMS/*/*.rpm packages/ - RUN tar -cvf payload.tar . && chmod -R a+rw "${HOME}" + COPY microshift /microshift + COPY --from=rpms /rpms.tar /rpms.tar inputs: cli: paths: @@ -64,10 +57,6 @@ images: - src paths: - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/scripts/devenv-builder/configure-vm.sh - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/validate-microshift - - destination_dir: ./microshift source_path: /go/src/github.com/openshift/microshift test-bin: paths: diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index 80ae59c9087fa..7cedcc26bf7b3 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -38,22 +38,15 @@ images: FROM src as rpms RUN dnf install --setopt=tsflags=nodocs -y selinux-policy-devel RUN make rpm && TARGET_ARCH=aarch64 make rpm + RUN tar cvf /rpms.tar -C _output/rpmbuild/RPMS/ . FROM test-runtime - USER root - ENV HOME=/tmp/secret - ENV PAYLOAD_PATH=$HOME/payload - WORKDIR $PAYLOAD_PATH - COPY oc openshift-tests usr/bin/ - RUN chmod 755 usr/bin/oc && ln -rs usr/bin/oc usr/bin/kubectl + COPY oc openshift-tests /usr/bin/ + RUN ln -rs /usr/bin/oc /usr/bin/kubectl - COPY validate-microshift /tmp/validate-microshift - COPY busybox_running_check.sh configure-vm.sh usr/bin/ - RUN chmod 755 usr/bin/configure-vm.sh usr/bin/busybox_running_check.sh - - COPY --from=rpms /go/src/github.com/openshift/microshift/_output/rpmbuild/RPMS/*/*.rpm packages/ - RUN tar -cvf payload.tar . && chmod -R a+rw "${HOME}" + COPY microshift /microshift + COPY --from=rpms /rpms.tar /rpms.tar inputs: cli: paths: @@ -64,12 +57,6 @@ images: - src paths: - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/scripts/devenv-builder/configure-vm.sh - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/validate-microshift - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/docs/config/busybox_running_check.sh - - destination_dir: ./microshift source_path: /go/src/github.com/openshift/microshift test-bin: paths: diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.14.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.14.yaml index d91c11bafed1a..f003ca0a4e569 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.14.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.14.yaml @@ -38,22 +38,15 @@ images: FROM src as rpms RUN dnf install --setopt=tsflags=nodocs -y selinux-policy-devel RUN make rpm && TARGET_ARCH=aarch64 make rpm + RUN tar cvf /rpms.tar -C _output/rpmbuild/RPMS/ . FROM test-runtime - USER root - ENV HOME=/tmp/secret - ENV PAYLOAD_PATH=$HOME/payload - WORKDIR $PAYLOAD_PATH - COPY oc openshift-tests usr/bin/ - RUN chmod 755 usr/bin/oc && ln -rs usr/bin/oc usr/bin/kubectl + COPY oc openshift-tests /usr/bin/ + RUN ln -rs /usr/bin/oc /usr/bin/kubectl - COPY validate-microshift /tmp/validate-microshift - COPY busybox_running_check.sh configure-vm.sh usr/bin/ - RUN chmod 755 usr/bin/configure-vm.sh usr/bin/busybox_running_check.sh - - COPY --from=rpms /go/src/github.com/openshift/microshift/_output/rpmbuild/RPMS/*/*.rpm packages/ - RUN tar -cvf payload.tar . && chmod -R a+rw "${HOME}" + COPY microshift /microshift + COPY --from=rpms /rpms.tar /rpms.tar inputs: cli: paths: @@ -64,12 +57,6 @@ images: - src paths: - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/scripts/devenv-builder/configure-vm.sh - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/validate-microshift - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/docs/config/busybox_running_check.sh - - destination_dir: ./microshift source_path: /go/src/github.com/openshift/microshift test-bin: paths: @@ -151,62 +138,7 @@ tests: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 workflow: openshift-microshift-e2e-openshift-conformance-reduced -- as: e2e-reboot - cluster: build02 - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-reboot-tests -- as: e2e-reboot-arm - cluster: build02 - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-reboot-tests -- as: e2e-greenboot - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-greenboot -- as: e2e-greenboot-arm - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-greenboot -- as: e2e-router-smoke-test - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-router-smoke-test -- as: e2e-router-smoke-test-arm - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-router-smoke-test -- as: e2e-loadbalancer-smoke-test +- as: microshift-e2e cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -214,8 +146,8 @@ tests: cluster_profile: gcp env: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test -- as: e2e-loadbalancer-smoke-test-arm + workflow: openshift-microshift-e2e-microshift-tests +- as: microshift-e2e-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -224,7 +156,7 @@ tests: env: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test + workflow: openshift-microshift-e2e-microshift-tests zz_generated_metadata: branch: release-4.14 org: openshift diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.15.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.15.yaml index 2960d6bdf9887..6fc4b28caea09 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.15.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.15.yaml @@ -38,22 +38,15 @@ images: FROM src as rpms RUN dnf install --setopt=tsflags=nodocs -y selinux-policy-devel RUN make rpm && TARGET_ARCH=aarch64 make rpm + RUN tar cvf /rpms.tar -C _output/rpmbuild/RPMS/ . FROM test-runtime - USER root - ENV HOME=/tmp/secret - ENV PAYLOAD_PATH=$HOME/payload - WORKDIR $PAYLOAD_PATH - COPY oc openshift-tests usr/bin/ - RUN chmod 755 usr/bin/oc && ln -rs usr/bin/oc usr/bin/kubectl + COPY oc openshift-tests /usr/bin/ + RUN ln -rs /usr/bin/oc /usr/bin/kubectl - COPY validate-microshift /tmp/validate-microshift - COPY busybox_running_check.sh configure-vm.sh usr/bin/ - RUN chmod 755 usr/bin/configure-vm.sh usr/bin/busybox_running_check.sh - - COPY --from=rpms /go/src/github.com/openshift/microshift/_output/rpmbuild/RPMS/*/*.rpm packages/ - RUN tar -cvf payload.tar . && chmod -R a+rw "${HOME}" + COPY microshift /microshift + COPY --from=rpms /rpms.tar /rpms.tar inputs: cli: paths: @@ -64,12 +57,6 @@ images: - src paths: - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/scripts/devenv-builder/configure-vm.sh - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/validate-microshift - - destination_dir: . - source_path: /go/src/github.com/openshift/microshift/docs/config/busybox_running_check.sh - - destination_dir: ./microshift source_path: /go/src/github.com/openshift/microshift test-bin: paths: @@ -150,62 +137,7 @@ tests: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 workflow: openshift-microshift-e2e-openshift-conformance-reduced -- as: e2e-reboot - cluster: build02 - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-reboot-tests -- as: e2e-reboot-arm - cluster: build02 - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-reboot-tests -- as: e2e-greenboot - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-greenboot -- as: e2e-greenboot-arm - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-greenboot -- as: e2e-router-smoke-test - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-router-smoke-test -- as: e2e-router-smoke-test-arm - cluster: build02 - optional: true - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - steps: - cluster_profile: gcp - env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-router-smoke-test -- as: e2e-loadbalancer-smoke-test +- as: microshift-e2e cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -213,8 +145,8 @@ tests: cluster_profile: gcp env: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test -- as: e2e-loadbalancer-smoke-test-arm + workflow: openshift-microshift-e2e-microshift-tests +- as: microshift-e2e-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -223,7 +155,7 @@ tests: env: GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test + workflow: openshift-microshift-e2e-microshift-tests zz_generated_metadata: branch: release-4.15 org: openshift diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml index 8d90bafbf8a9a..5d09e7bd474ba 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-main-presubmits.yaml @@ -1,491 +1,5 @@ presubmits: openshift/microshift: - - agent: kubernetes - always_run: false - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/e2e-greenboot - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-greenboot - optional: true - rerun_command: /test e2e-greenboot - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-greenboot-cluster-profile - - --target=e2e-greenboot - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-greenboot-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-greenboot,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/e2e-greenboot-arm - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-greenboot-arm - optional: true - rerun_command: /test e2e-greenboot-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-greenboot-arm-cluster-profile - - --target=e2e-greenboot-arm - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-greenboot-arm-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-greenboot-arm,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/e2e-loadbalancer-smoke-test - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-loadbalancer-smoke-test - optional: true - rerun_command: /test e2e-loadbalancer-smoke-test - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-loadbalancer-smoke-test-cluster-profile - - --target=e2e-loadbalancer-smoke-test - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-loadbalancer-smoke-test-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-loadbalancer-smoke-test,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/e2e-loadbalancer-smoke-test-arm - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-loadbalancer-smoke-test-arm - optional: true - rerun_command: /test e2e-loadbalancer-smoke-test-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-loadbalancer-smoke-test-arm-cluster-profile - - --target=e2e-loadbalancer-smoke-test-arm - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-loadbalancer-smoke-test-arm-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-loadbalancer-smoke-test-arm,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/e2e-microshift-tests - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-microshift-tests - optional: true - rerun_command: /test e2e-microshift-tests - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-microshift-tests-cluster-profile - - --target=e2e-microshift-tests - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-microshift-tests-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-microshift-tests,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/e2e-microshift-tests-arm - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-microshift-tests-arm - optional: true - rerun_command: /test e2e-microshift-tests-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-microshift-tests-arm-cluster-profile - - --target=e2e-microshift-tests-arm - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-microshift-tests-arm-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-microshift-tests-arm,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -647,114 +161,28 @@ presubmits: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-openshift-conformance-reduced-arm,?($|\s.*) - agent: kubernetes - always_run: false - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/e2e-reboot - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-reboot - rerun_command: /test e2e-reboot - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-reboot-cluster-profile - - --target=e2e-reboot - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-reboot-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-reboot,?($|\s.*) - - agent: kubernetes - always_run: false + always_run: true branches: - ^main$ - ^main- cluster: build02 - context: ci/prow/e2e-reboot-arm + context: ci/prow/images decorate: true decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-reboot-arm - rerun_command: /test e2e-reboot-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) + name: pull-ci-openshift-microshift-main-images + rerun_command: /test images spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-reboot-arm-cluster-profile - - --target=e2e-reboot-arm + - --target=[images] + - --target=[release:latest] command: - ci-operator image: ci-operator:latest @@ -764,14 +192,6 @@ presubmits: requests: cpu: 10m volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-reboot-arm-cluster-profile - name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -783,36 +203,20 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-reboot-arm,?($|\s.*) + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: false branches: - ^main$ - ^main- cluster: build02 - context: ci/prow/e2e-router-smoke-test + context: ci/prow/microshift-e2e decorate: true decoration_config: skip_cloning: true @@ -822,9 +226,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-router-smoke-test + name: pull-ci-openshift-microshift-main-microshift-e2e optional: true - rerun_command: /test e2e-router-smoke-test + rerun_command: /test microshift-e2e run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -834,8 +238,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-router-smoke-test-cluster-profile - - --target=e2e-router-smoke-test + - --secret-dir=/usr/local/microshift-e2e-cluster-profile + - --target=microshift-e2e command: - ci-operator image: ci-operator:latest @@ -851,7 +255,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-router-smoke-test-cluster-profile + - mountPath: /usr/local/microshift-e2e-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -886,14 +290,14 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e,?($|\s.*) - agent: kubernetes always_run: false branches: - ^main$ - ^main- cluster: build02 - context: ci/prow/e2e-router-smoke-test-arm + context: ci/prow/microshift-e2e-arm decorate: true decoration_config: skip_cloning: true @@ -903,9 +307,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-e2e-router-smoke-test-arm + name: pull-ci-openshift-microshift-main-microshift-e2e-arm optional: true - rerun_command: /test e2e-router-smoke-test-arm + rerun_command: /test microshift-e2e-arm run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -915,8 +319,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-router-smoke-test-arm-cluster-profile - - --target=e2e-router-smoke-test-arm + - --secret-dir=/usr/local/microshift-e2e-arm-cluster-profile + - --target=microshift-e2e-arm command: - ci-operator image: ci-operator:latest @@ -932,7 +336,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-router-smoke-test-arm-cluster-profile + - mountPath: /usr/local/microshift-e2e-arm-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -967,57 +371,7 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test-arm,?($|\s.*) - - agent: kubernetes - always_run: true - branches: - - ^main$ - - ^main- - cluster: build02 - context: ci/prow/images - decorate: true - decoration_config: - skip_cloning: true - labels: - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-main-images - rerun_command: /test images - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --report-credentials-file=/etc/report/credentials - - --target=[images] - - --target=[release:latest] - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )images,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e-arm,?($|\s.*) - agent: kubernetes always_run: false branches: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.14-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.14-presubmits.yaml index 4cf9a98417085..d132134fafa8e 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.14-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.14-presubmits.yaml @@ -1,329 +1,5 @@ presubmits: openshift/microshift: - - agent: kubernetes - always_run: false - branches: - - ^release-4\.14$ - - ^release-4\.14- - cluster: build02 - context: ci/prow/e2e-greenboot - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-greenboot - optional: true - rerun_command: /test e2e-greenboot - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-greenboot-cluster-profile - - --target=e2e-greenboot - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-greenboot-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-greenboot,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^release-4\.14$ - - ^release-4\.14- - cluster: build02 - context: ci/prow/e2e-greenboot-arm - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-greenboot-arm - optional: true - rerun_command: /test e2e-greenboot-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-greenboot-arm-cluster-profile - - --target=e2e-greenboot-arm - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-greenboot-arm-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-greenboot-arm,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^release-4\.14$ - - ^release-4\.14- - cluster: build02 - context: ci/prow/e2e-loadbalancer-smoke-test - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-loadbalancer-smoke-test - optional: true - rerun_command: /test e2e-loadbalancer-smoke-test - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-loadbalancer-smoke-test-cluster-profile - - --target=e2e-loadbalancer-smoke-test - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-loadbalancer-smoke-test-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-loadbalancer-smoke-test,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^release-4\.14$ - - ^release-4\.14- - cluster: build02 - context: ci/prow/e2e-loadbalancer-smoke-test-arm - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-loadbalancer-smoke-test-arm - optional: true - rerun_command: /test e2e-loadbalancer-smoke-test-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-loadbalancer-smoke-test-arm-cluster-profile - - --target=e2e-loadbalancer-smoke-test-arm - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-loadbalancer-smoke-test-arm-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-loadbalancer-smoke-test-arm,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -485,114 +161,27 @@ presubmits: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-openshift-conformance-reduced-arm,?($|\s.*) - agent: kubernetes - always_run: false - branches: - - ^release-4\.14$ - - ^release-4\.14- - cluster: build02 - context: ci/prow/e2e-reboot - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-reboot - rerun_command: /test e2e-reboot - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-reboot-cluster-profile - - --target=e2e-reboot - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-reboot-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-reboot,?($|\s.*) - - agent: kubernetes - always_run: false + always_run: true branches: - ^release-4\.14$ - ^release-4\.14- - cluster: build02 - context: ci/prow/e2e-reboot-arm + cluster: build04 + context: ci/prow/images decorate: true decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-reboot-arm - rerun_command: /test e2e-reboot-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) + name: pull-ci-openshift-microshift-release-4.14-images + rerun_command: /test images spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-reboot-arm-cluster-profile - - --target=e2e-reboot-arm + - --target=[images] command: - ci-operator image: ci-operator:latest @@ -602,14 +191,6 @@ presubmits: requests: cpu: 10m volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-reboot-arm-cluster-profile - name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -621,36 +202,20 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-reboot-arm,?($|\s.*) + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: false branches: - ^release-4\.14$ - ^release-4\.14- cluster: build02 - context: ci/prow/e2e-router-smoke-test + context: ci/prow/microshift-e2e decorate: true decoration_config: skip_cloning: true @@ -660,9 +225,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-router-smoke-test + name: pull-ci-openshift-microshift-release-4.14-microshift-e2e optional: true - rerun_command: /test e2e-router-smoke-test + rerun_command: /test microshift-e2e run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -672,8 +237,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-router-smoke-test-cluster-profile - - --target=e2e-router-smoke-test + - --secret-dir=/usr/local/microshift-e2e-cluster-profile + - --target=microshift-e2e command: - ci-operator image: ci-operator:latest @@ -689,7 +254,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-router-smoke-test-cluster-profile + - mountPath: /usr/local/microshift-e2e-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -724,14 +289,14 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e,?($|\s.*) - agent: kubernetes always_run: false branches: - ^release-4\.14$ - ^release-4\.14- cluster: build02 - context: ci/prow/e2e-router-smoke-test-arm + context: ci/prow/microshift-e2e-arm decorate: true decoration_config: skip_cloning: true @@ -741,9 +306,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-e2e-router-smoke-test-arm + name: pull-ci-openshift-microshift-release-4.14-microshift-e2e-arm optional: true - rerun_command: /test e2e-router-smoke-test-arm + rerun_command: /test microshift-e2e-arm run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -753,8 +318,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-router-smoke-test-arm-cluster-profile - - --target=e2e-router-smoke-test-arm + - --secret-dir=/usr/local/microshift-e2e-arm-cluster-profile + - --target=microshift-e2e-arm command: - ci-operator image: ci-operator:latest @@ -770,7 +335,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-router-smoke-test-arm-cluster-profile + - mountPath: /usr/local/microshift-e2e-arm-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -805,56 +370,7 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test-arm,?($|\s.*) - - agent: kubernetes - always_run: true - branches: - - ^release-4\.14$ - - ^release-4\.14- - cluster: build04 - context: ci/prow/images - decorate: true - decoration_config: - skip_cloning: true - labels: - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.14-images - rerun_command: /test images - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --report-credentials-file=/etc/report/credentials - - --target=[images] - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )images,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e-arm,?($|\s.*) - agent: kubernetes always_run: false branches: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.15-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.15-presubmits.yaml index 8bbf7a6360e26..07b7b9e1c9e79 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.15-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.15-presubmits.yaml @@ -1,329 +1,5 @@ presubmits: openshift/microshift: - - agent: kubernetes - always_run: false - branches: - - ^release-4\.15$ - - ^release-4\.15- - cluster: build02 - context: ci/prow/e2e-greenboot - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-greenboot - optional: true - rerun_command: /test e2e-greenboot - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-greenboot-cluster-profile - - --target=e2e-greenboot - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-greenboot-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-greenboot,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^release-4\.15$ - - ^release-4\.15- - cluster: build02 - context: ci/prow/e2e-greenboot-arm - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-greenboot-arm - optional: true - rerun_command: /test e2e-greenboot-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-greenboot-arm-cluster-profile - - --target=e2e-greenboot-arm - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-greenboot-arm-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-greenboot-arm,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^release-4\.15$ - - ^release-4\.15- - cluster: build02 - context: ci/prow/e2e-loadbalancer-smoke-test - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-loadbalancer-smoke-test - optional: true - rerun_command: /test e2e-loadbalancer-smoke-test - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-loadbalancer-smoke-test-cluster-profile - - --target=e2e-loadbalancer-smoke-test - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-loadbalancer-smoke-test-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-loadbalancer-smoke-test,?($|\s.*) - - agent: kubernetes - always_run: false - branches: - - ^release-4\.15$ - - ^release-4\.15- - cluster: build02 - context: ci/prow/e2e-loadbalancer-smoke-test-arm - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-loadbalancer-smoke-test-arm - optional: true - rerun_command: /test e2e-loadbalancer-smoke-test-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-loadbalancer-smoke-test-arm-cluster-profile - - --target=e2e-loadbalancer-smoke-test-arm - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-loadbalancer-smoke-test-arm-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-loadbalancer-smoke-test-arm,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -485,114 +161,28 @@ presubmits: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-openshift-conformance-reduced-arm,?($|\s.*) - agent: kubernetes - always_run: false - branches: - - ^release-4\.15$ - - ^release-4\.15- - cluster: build02 - context: ci/prow/e2e-reboot - decorate: true - decoration_config: - skip_cloning: true - labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-reboot - rerun_command: /test e2e-reboot - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-reboot-cluster-profile - - --target=e2e-reboot - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-reboot-cluster-profile - name: cluster-profile - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-reboot,?($|\s.*) - - agent: kubernetes - always_run: false + always_run: true branches: - ^release-4\.15$ - ^release-4\.15- - cluster: build02 - context: ci/prow/e2e-reboot-arm + cluster: build04 + context: ci/prow/images decorate: true decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp - ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-reboot-arm - rerun_command: /test e2e-reboot-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) + name: pull-ci-openshift-microshift-release-4.15-images + rerun_command: /test images spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-reboot-arm-cluster-profile - - --target=e2e-reboot-arm + - --target=[images] + - --target=[release:latest] command: - ci-operator image: ci-operator:latest @@ -602,14 +192,6 @@ presubmits: requests: cpu: 10m volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /usr/local/e2e-reboot-arm-cluster-profile - name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -621,36 +203,20 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: - - name: boskos - secret: - items: - - key: credentials - path: credentials - secretName: boskos-credentials - - name: ci-pull-credentials - secret: - secretName: ci-pull-credentials - - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-reboot-arm,?($|\s.*) + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: false branches: - ^release-4\.15$ - ^release-4\.15- cluster: build02 - context: ci/prow/e2e-router-smoke-test + context: ci/prow/microshift-e2e decorate: true decoration_config: skip_cloning: true @@ -660,9 +226,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-router-smoke-test + name: pull-ci-openshift-microshift-release-4.15-microshift-e2e optional: true - rerun_command: /test e2e-router-smoke-test + rerun_command: /test microshift-e2e run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -672,8 +238,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-router-smoke-test-cluster-profile - - --target=e2e-router-smoke-test + - --secret-dir=/usr/local/microshift-e2e-cluster-profile + - --target=microshift-e2e command: - ci-operator image: ci-operator:latest @@ -689,7 +255,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-router-smoke-test-cluster-profile + - mountPath: /usr/local/microshift-e2e-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -724,14 +290,14 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e,?($|\s.*) - agent: kubernetes always_run: false branches: - ^release-4\.15$ - ^release-4\.15- cluster: build02 - context: ci/prow/e2e-router-smoke-test-arm + context: ci/prow/microshift-e2e-arm decorate: true decoration_config: skip_cloning: true @@ -741,9 +307,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-e2e-router-smoke-test-arm + name: pull-ci-openshift-microshift-release-4.15-microshift-e2e-arm optional: true - rerun_command: /test e2e-router-smoke-test-arm + rerun_command: /test microshift-e2e-arm run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -753,8 +319,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-router-smoke-test-arm-cluster-profile - - --target=e2e-router-smoke-test-arm + - --secret-dir=/usr/local/microshift-e2e-arm-cluster-profile + - --target=microshift-e2e-arm command: - ci-operator image: ci-operator:latest @@ -770,7 +336,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-router-smoke-test-arm-cluster-profile + - mountPath: /usr/local/microshift-e2e-arm-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -805,57 +371,7 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test-arm,?($|\s.*) - - agent: kubernetes - always_run: true - branches: - - ^release-4\.15$ - - ^release-4\.15- - cluster: build04 - context: ci/prow/images - decorate: true - decoration_config: - skip_cloning: true - labels: - ci.openshift.io/generator: prowgen - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.15-images - rerun_command: /test images - spec: - containers: - - args: - - --gcs-upload-secret=/secrets/gcs/service-account.json - - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - - --report-credentials-file=/etc/report/credentials - - --target=[images] - - --target=[release:latest] - command: - - ci-operator - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /etc/pull-secret - name: pull-secret - readOnly: true - - mountPath: /etc/report - name: result-aggregator - readOnly: true - serviceAccountName: ci-operator - volumes: - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator - trigger: (?m)^/test( | .* )images,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e-arm,?($|\s.*) - agent: kubernetes always_run: false branches: diff --git a/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh index 44fa9d373d501..4894695a01f61 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh @@ -156,7 +156,6 @@ chmod +x "${HOME}/greenboot_check.sh" scp "${HOME}/greenboot_check.sh" "${INSTANCE_PREFIX}:~/greenboot_check.sh" if ! ssh "${INSTANCE_PREFIX}" "sudo ~/greenboot_check.sh"; then - scp -r /tmp/validate-microshift "${INSTANCE_PREFIX}":~/validate-microshift - ssh "${INSTANCE_PREFIX}" 'chmod +x ~/validate-microshift/cluster-debug-info.sh && sudo ~/validate-microshift/cluster-debug-info.sh' + ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh index f7c58419367c7..ec97f59dd226b 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh @@ -102,6 +102,5 @@ for try in $(seq 1 "${retries}"); do done set -x -scp -r /tmp/validate-microshift "${INSTANCE_PREFIX}:~/validate-microshift" -ssh "${INSTANCE_PREFIX}" "bash ~/validate-microshift/cluster-debug-info.sh" +ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh exit 1 diff --git a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh index 3e656df93ea0f..405a61b79479c 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/microshift-tests/openshift-microshift-e2e-microshift-tests-commands.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' -set -x +set -xeuo pipefail trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM @@ -22,24 +20,17 @@ gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" -mkdir -p "${HOME}"/.ssh -cp "${CLUSTER_PROFILE_DIR}/ssh-privatekey" "${HOME}/.ssh/google_compute_engine" -chmod 0600 "${HOME}/.ssh/google_compute_engine" -cp "${CLUSTER_PROFILE_DIR}/ssh-publickey" "${HOME}/.ssh/google_compute_engine.pub" - +mkdir -p "${HOME}/.ssh" cat <"${HOME}/.ssh/config" Host ${IP_ADDRESS} - IdentityFile ~/.ssh/google_compute_engine - ServerAliveInterval 30 - ServerAliveCountMax 1200 + User rhel8user + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 EOF chmod 0600 "${HOME}/.ssh/config" -gcloud compute ssh \ - --project "${GOOGLE_PROJECT_ID}" --zone "${GOOGLE_COMPUTE_ZONE}" \ - "rhel8user@${INSTANCE_PREFIX}" \ - --command "cat /etc/ssh/ssh_host_*_key.pub" | cut -d' ' -f1,2 | sed "s,^,${IP_ADDRESS} ," >>~/.ssh/known_hosts - firewall::open_port() { local port="${1}" local protocol="${2:-tcp}" @@ -56,4 +47,4 @@ export -f firewall::open_port export -f firewall::close_port export INSTANCE_PREFIX -USHIFT_IP="${IP_ADDRESS}" USHIFT_USER=rhel8user ./microshift/e2e/main.sh run +USHIFT_IP="${IP_ADDRESS}" USHIFT_USER=rhel8user /microshift/e2e/main.sh run diff --git a/ci-operator/step-registry/openshift/microshift/e2e/openshift-conformance-reduced/openshift-microshift-e2e-openshift-conformance-reduced-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/openshift-conformance-reduced/openshift-microshift-e2e-openshift-conformance-reduced-commands.sh index d11abe8ad996d..e83fbbb3719a2 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/openshift-conformance-reduced/openshift-microshift-e2e-openshift-conformance-reduced-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/openshift-conformance-reduced/openshift-microshift-e2e-openshift-conformance-reduced-commands.sh @@ -570,8 +570,8 @@ cat <<'EOF' > "${HOME}"/suite.txt "[sig-storage] Subpath Container restart should verify that container can restart successfully after configmaps modified [Skipped:NoOptionalCapabilities] [Suite:openshift/conformance/parallel] [Suite:k8s]" "[sig-storage] Volumes ConfigMap should be mountable [Skipped:NoOptionalCapabilities] [Suite:openshift/conformance/parallel] [Suite:k8s]" EOF -chmod +r "${HOME}"/suite.txt +chmod +r "${HOME}/suite.txt" ssh "${INSTANCE_PREFIX}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig -PATH=${PAYLOAD_PATH}/usr/bin:$PATH KUBECONFIG=/tmp/kubeconfig ${PAYLOAD_PATH}/usr/bin/openshift-tests run -v 2 --provider=none -f "${HOME}"/suite.txt -o ${ARTIFACT_DIR}/e2e.log --junit-dir ${ARTIFACT_DIR}/junit +KUBECONFIG=/tmp/kubeconfig openshift-tests run -v 2 --provider=none -f "${HOME}/suite.txt" -o "${ARTIFACT_DIR}/e2e.log" --junit-dir "${ARTIFACT_DIR}/junit" diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index 3f448f58f47a9..6eb4fe2aae38f 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -euo pipefail +set -xeuo pipefail trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM @@ -48,7 +48,7 @@ metadata: name: test-claim spec: accessModes: - - ReadWriteOnce + - ReadWriteOnce storageClassName: topolvm-provisioner resources: requests: @@ -82,9 +82,10 @@ spec: - mountPath: /vol name: test-vol volumes: - - name: test-vol - persistentVolumeClaim: - claimName: test-claim + - name: test-vol + persistentVolumeClaim: + claimName: test-claim + EOF_INNER echo "waiting for pod condition" >&2 @@ -95,8 +96,7 @@ chmod +x "${HOME}"/reboot-test.sh scp "${HOME}"/reboot-test.sh "${INSTANCE_PREFIX}":~/reboot-test.sh if ! ssh "${INSTANCE_PREFIX}" 'sudo ~/reboot-test.sh'; then - scp -r /tmp/validate-microshift "${INSTANCE_PREFIX}":~/validate-microshift - ssh "${INSTANCE_PREFIX}" 'chmod +x ~/validate-microshift/cluster-debug-info.sh && sudo -E ~/validate-microshift/cluster-debug-info.sh' + ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index 478dadda07790..d8bcf7025abde 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -5,83 +5,47 @@ set -xeuo pipefail trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM INSTANCE_PREFIX="${NAMESPACE}"-"${JOB_NAME_HASH}" -GOOGLE_PROJECT_ID="$(< ${CLUSTER_PROFILE_DIR}/openshift_gcp_project)" +GOOGLE_PROJECT_ID="$(<${CLUSTER_PROFILE_DIR}/openshift_gcp_project)" GOOGLE_COMPUTE_REGION="${LEASED_RESOURCE}" -GOOGLE_COMPUTE_ZONE="$(< ${SHARED_DIR}/openshift_gcp_compute_zone)" +GOOGLE_COMPUTE_ZONE="$(<${SHARED_DIR}/openshift_gcp_compute_zone)" if [[ -z "${GOOGLE_COMPUTE_ZONE}" ]]; then echo "Expected \${SHARED_DIR}/openshift_gcp_compute_zone to contain the GCP zone" exit 1 fi -mkdir -p "${HOME}"/.ssh - -# gcloud compute will use this key rather than create a new one -cp "${CLUSTER_PROFILE_DIR}"/ssh-privatekey "${HOME}"/.ssh/google_compute_engine -chmod 0600 "${HOME}"/.ssh/google_compute_engine -cp "${CLUSTER_PROFILE_DIR}"/ssh-publickey "${HOME}"/.ssh/google_compute_engine.pub -echo 'ServerAliveInterval 30' | tee -a "${HOME}"/.ssh/config -echo 'ServerAliveCountMax 1200' | tee -a "${HOME}"/.ssh/config -chmod 0600 "${HOME}"/.ssh/config - -# Copy pull secret to user home -cp "${CLUSTER_PROFILE_DIR}"/pull-secret "${HOME}"/pull-secret - gcloud auth activate-service-account --quiet --key-file "${CLUSTER_PROFILE_DIR}"/gce.json gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" -cat > "${HOME}"/wait_for_pod_ready.sh <<'EOF' -#!/bin/bash -set -xeuo pipefail +IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" -export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig -echo "waiting for pod response" >&2 -oc wait --for=condition=Ready --timeout=120s pod/test-pod || exit 1 -echo "pod posted ready status" >&2 +mkdir -p "${HOME}"/.ssh +cat << EOF > "${HOME}"/.ssh/config +Host ${INSTANCE_PREFIX} + User rhel8user + HostName ${IP_ADDRESS} + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new EOF -chmod +x "${HOME}"/wait_for_pod_ready.sh +chmod 0600 "${HOME}"/.ssh/config -# restart the VM gcloud compute instances start "${INSTANCE_PREFIX}" --zone "${GOOGLE_COMPUTE_ZONE}" -# Steps may not be used more than once in a test, so this block duplicates the behavior of wait-for-ssh for reboot tests. timeout=1200 # 20 minute wait. ->&2 echo "Polling ssh connectivity before proceeding. Timeout=$timeout second" start=$(date +"%s") -until gcloud compute --project "${GOOGLE_PROJECT_ID}" ssh \ - --zone "${GOOGLE_COMPUTE_ZONE}" \ - rhel8user@"${INSTANCE_PREFIX}" \ - --command 'echo Hello, CI'; -do - if (( $(date +"%s") - $start >= $timeout )); then +until ssh "${INSTANCE_PREFIX}" 'true'; do + if (( $(date +"%s") - start >= timeout )); then echo "timed out out waiting for ssh connection" >&2 exit 1 fi - echo "waiting for ssh connection" done >&2 echo "It took $timeout seconds to connect via ssh" -gcloud compute scp \ - --project "${GOOGLE_PROJECT_ID}" \ - --zone "${GOOGLE_COMPUTE_ZONE}" \ - --recurse "${HOME}"/wait_for_pod_ready.sh rhel8user@"${INSTANCE_PREFIX}":~/wait_for_pod_ready.sh - -if ! gcloud compute --project "${GOOGLE_PROJECT_ID}" ssh \ - --zone "${GOOGLE_COMPUTE_ZONE}" \ - rhel8user@"${INSTANCE_PREFIX}" \ - --command 'sudo ~/wait_for_pod_ready.sh'; then - - gcloud compute scp \ - --quiet \ - --project "${GOOGLE_PROJECT_ID}" \ - --zone "${GOOGLE_COMPUTE_ZONE}" \ - --recurse /tmp/validate-microshift "rhel8user@${INSTANCE_PREFIX}:~/validate-microshift" - - gcloud compute ssh \ - --project "${GOOGLE_PROJECT_ID}" \ - --zone "${GOOGLE_COMPUTE_ZONE}" \ - "rhel8user@${INSTANCE_PREFIX}" \ - --command "bash ~/validate-microshift/cluster-debug-info.sh" +ssh "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig +# 180s to accomodate for slow kubelet actions with topolvm pvc after reboot +if ! KUBECONFIG=/tmp/kubeconfig oc wait --for=condition=Ready --timeout=180s pod/test-pod; then + ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh + exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh index 9a6c9165761ec..409465ef1daa4 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh @@ -101,6 +101,5 @@ for try in $(seq 1 "${retries}"); do done set -x -scp /tmp/validate-microshift "${INSTANCE_PREFIX}:~/validate-microshift" -ssh "${INSTANCE_PREFIX}" "bash ~/validate-microshift/cluster-debug-info.sh" +ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh exit 1 diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test/openshift-microshift-e2e-test-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/test/openshift-microshift-e2e-test-commands.sh index 47d508913fa32..77d741709d163 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/test/openshift-microshift-e2e-test-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/test/openshift-microshift-e2e-test-commands.sh @@ -32,4 +32,4 @@ chmod 0600 "${HOME}"/.ssh/config ssh "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig -PATH=${PAYLOAD_PATH}/usr/bin:$PATH KUBECONFIG=/tmp/kubeconfig ${PAYLOAD_PATH}/usr/bin/openshift-tests run "${TEST_SUITE}" -v 2 --provider=none -o ${ARTIFACT_DIR}/e2e.log --junit-dir ${ARTIFACT_DIR}/junit +KUBECONFIG=/tmp/kubeconfig openshift-tests run "${TEST_SUITE}" -v 2 --provider=none -o "${ARTIFACT_DIR}/e2e.log" --junit-dir "${ARTIFACT_DIR}/junit" diff --git a/ci-operator/step-registry/openshift/microshift/infra/rpm-install/openshift-microshift-infra-rpm-install-commands.sh b/ci-operator/step-registry/openshift/microshift/infra/rpm-install/openshift-microshift-infra-rpm-install-commands.sh index 963ef36180419..e9cc8ad0732ad 100644 --- a/ci-operator/step-registry/openshift/microshift/infra/rpm-install/openshift-microshift-infra-rpm-install-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/infra/rpm-install/openshift-microshift-infra-rpm-install-commands.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -euox pipefail +set -xeuo pipefail trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM @@ -29,8 +29,8 @@ Host ${INSTANCE_PREFIX} EOF chmod 0600 "${HOME}"/.ssh/config -cat < "${PAYLOAD_PATH}"/usr/bin/pre_rpm_install.sh -#! /bin/bash +cat < /tmp/install.sh +#!/bin/bash set -xeuo pipefail rpm --rebuilddb @@ -40,33 +40,41 @@ subscription-manager register \ --org="$(cat /var/run/rhsm/subscription-manager-org)" \ --activationkey="$(cat /var/run/rhsm/subscription-manager-act-key)" -sed -i '2i set -x' /usr/bin/configure-vm.sh - -sudo useradd -m -G wheel microshift -sudo echo -e 'microshift\tALL=(ALL)\tNOPASSWD: ALL' > /etc/sudoers.d/microshift -cd /home/microshift && sudo -nu microshift configure-vm.sh --no-build /etc/crio/openshift-pull-secret - -dnf install jq firewalld -y -dnf localinstall -y \$(find /packages/ -iname "*\$(uname -p)*" -or -iname '*noarch*') -EOF -chmod +x usr/bin/pre_rpm_install.sh - -mkdir -p "${PAYLOAD_PATH}"/etc/microshift -IP_ADDRESS="$(gcloud compute instances describe ${INSTANCE_PREFIX} --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" -cat << EOF > "${PAYLOAD_PATH}"/etc/microshift/config.yaml ---- +mkdir -p /etc/microshift +cat << EOF2 > /etc/microshift/config.yaml apiServer: subjectAltNames: - ${IP_ADDRESS} +EOF2 + +useradd -m -G wheel microshift +echo -e 'microshift\tALL=(ALL)\tNOPASSWD: ALL' > /etc/sudoers.d/microshift + +OPTS="" +if grep "\-\-no-build-deps" /tmp/configure-vm.sh; then + OPTS="--no-build-deps --force-firewall" +fi +cd /home/microshift && sudo -nu microshift bash -x /tmp/configure-vm.sh --no-build \${OPTS} /tmp/pull-secret + +mkdir -p /tmp/rpms +tar -xhvf /tmp/rpms.tar --strip-components 2 -C /tmp/rpms +dnf localinstall -y \$(find /tmp/rpms/ -iname "*\$(uname -p)*" -or -iname '*noarch*') + +# 4.12 and 4.13 don't set up cri-o pull secret in case of --no-build +if [ ! -e /etc/crio/openshift-pull-secret ]; then + cp /tmp/pull-secret /etc/crio/openshift-pull-secret + chmod 600 /etc/crio/openshift-pull-secret +fi EOF +chmod +x /tmp/install.sh -mkdir -p "${PAYLOAD_PATH}"/etc/crio/ && cp "${CLUSTER_PROFILE_DIR}"/pull-secret "${PAYLOAD_PATH}"/etc/crio/openshift-pull-secret -chmod 600 "${PAYLOAD_PATH}"/etc/crio/openshift-pull-secret -tar -uvf $PAYLOAD_PATH/payload.tar . +scp \ + /rpms.tar \ + /tmp/install.sh \ + /microshift/scripts/devenv-builder/configure-vm.sh \ + "${CLUSTER_PROFILE_DIR}/pull-secret" \ + "${INSTANCE_PREFIX}:/tmp" -scp "${PAYLOAD_PATH}/payload.tar" "${INSTANCE_PREFIX}":~ -ssh "${INSTANCE_PREFIX}" \ - 'sudo tar -xhvf $HOME/payload.tar -C / && \ - sudo pre_rpm_install.sh' +ssh "${INSTANCE_PREFIX}" "sudo /tmp/install.sh" gcloud compute firewall-rules update "${INSTANCE_PREFIX}" --allow tcp:22,icmp,tcp:80,tcp:443,tcp:6443 diff --git a/ci-operator/step-registry/openshift/microshift/infra/wait-for-cluster-up/openshift-microshift-infra-wait-for-cluster-up-commands.sh b/ci-operator/step-registry/openshift/microshift/infra/wait-for-cluster-up/openshift-microshift-infra-wait-for-cluster-up-commands.sh index e2f00d3dd513b..c35622260fb10 100644 --- a/ci-operator/step-registry/openshift/microshift/infra/wait-for-cluster-up/openshift-microshift-infra-wait-for-cluster-up-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/infra/wait-for-cluster-up/openshift-microshift-infra-wait-for-cluster-up-commands.sh @@ -59,7 +59,7 @@ EOF chmod +x "${HOME}"/start_microshift.sh -scp -r /tmp/validate-microshift "${INSTANCE_PREFIX}":~/validate-microshift +scp -r /microshift/validate-microshift "${INSTANCE_PREFIX}":~/validate-microshift scp "${HOME}"/start_microshift.sh "${INSTANCE_PREFIX}":~/start_microshift.sh ssh "${INSTANCE_PREFIX}" '/home/rhel8user/start_microshift.sh' ssh "${INSTANCE_PREFIX}" \ diff --git a/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-commands.sh b/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-commands.sh index 5a86111a6c57b..d5743fd49ca5b 100644 --- a/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/rebase/openshift-microshift-rebase-commands.sh @@ -1,3 +1,8 @@ #!/bin/bash +if [[ "$JOB_NAME" == rehearse* ]]; then + echo "INFO: \$JOB_NAME starts with rehearse - running in DRY RUN mode" + export DRY_RUN=y +fi + ./scripts/auto-rebase/rebase_job_entrypoint.sh From 53479d1ee04144b3bca25fcaa7ee67d0bf2e37bd Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 14 Apr 2023 14:57:07 +0200 Subject: [PATCH 16/25] bring back old cluster-debug-info execution --- .../greenboot/openshift-microshift-e2e-greenboot-commands.sh | 3 ++- ...penshift-microshift-e2e-loadbalancer-smoke-test-commands.sh | 3 ++- .../openshift-microshift-e2e-reboot-tests-commands.sh | 3 ++- .../openshift-microshift-e2e-reboot-tests-verify-commands.sh | 3 ++- .../openshift-microshift-e2e-router-smoke-test-commands.sh | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh index 4894695a01f61..cee4b163b5c0e 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh @@ -156,6 +156,7 @@ chmod +x "${HOME}/greenboot_check.sh" scp "${HOME}/greenboot_check.sh" "${INSTANCE_PREFIX}:~/greenboot_check.sh" if ! ssh "${INSTANCE_PREFIX}" "sudo ~/greenboot_check.sh"; then - ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh + scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ + ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh index ec97f59dd226b..47d55d8456cfa 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh @@ -102,5 +102,6 @@ for try in $(seq 1 "${retries}"); do done set -x -ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh +scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ +ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' exit 1 diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index 6eb4fe2aae38f..6e8e6caf2e815 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -96,7 +96,8 @@ chmod +x "${HOME}"/reboot-test.sh scp "${HOME}"/reboot-test.sh "${INSTANCE_PREFIX}":~/reboot-test.sh if ! ssh "${INSTANCE_PREFIX}" 'sudo ~/reboot-test.sh'; then - ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh + scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ + ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index d8bcf7025abde..71ce2aa8873cb 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -46,6 +46,7 @@ ssh "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" # 180s to accomodate for slow kubelet actions with topolvm pvc after reboot if ! KUBECONFIG=/tmp/kubeconfig oc wait --for=condition=Ready --timeout=180s pod/test-pod; then - ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh + scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ + ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh index 409465ef1daa4..dccc4c671dc43 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh @@ -101,5 +101,6 @@ for try in $(seq 1 "${retries}"); do done set -x -ssh "${INSTANCE_PREFIX}" "sudo bash -s" < /microshift/validate-microshift/cluster-debug-info.sh +scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ +ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' exit 1 From 8c0930e55afed5856f450965f49c7957728ae6c8 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Fri, 14 Apr 2023 18:11:21 +0200 Subject: [PATCH 17/25] export KUBECONFIG for cluster-debug-info.sh --- .../greenboot/openshift-microshift-e2e-greenboot-commands.sh | 2 +- ...openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh | 2 +- .../openshift-microshift-e2e-reboot-tests-commands.sh | 2 +- .../openshift-microshift-e2e-reboot-tests-verify-commands.sh | 2 +- .../openshift-microshift-e2e-router-smoke-test-commands.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh index cee4b163b5c0e..9a2a70e1bd8fc 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/greenboot/openshift-microshift-e2e-greenboot-commands.sh @@ -157,6 +157,6 @@ scp "${HOME}/greenboot_check.sh" "${INSTANCE_PREFIX}:~/greenboot_check.sh" if ! ssh "${INSTANCE_PREFIX}" "sudo ~/greenboot_check.sh"; then scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ - ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' + ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh index 47d55d8456cfa..adaf0c04c7624 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test/openshift-microshift-e2e-loadbalancer-smoke-test-commands.sh @@ -103,5 +103,5 @@ done set -x scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ -ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' +ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index 6e8e6caf2e815..06e858c0de999 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -97,7 +97,7 @@ scp "${HOME}"/reboot-test.sh "${INSTANCE_PREFIX}":~/reboot-test.sh if ! ssh "${INSTANCE_PREFIX}" 'sudo ~/reboot-test.sh'; then scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ - ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' + ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index 71ce2aa8873cb..b4e55f9da7061 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -47,6 +47,6 @@ ssh "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" # 180s to accomodate for slow kubelet actions with topolvm pvc after reboot if ! KUBECONFIG=/tmp/kubeconfig oc wait --for=condition=Ready --timeout=180s pod/test-pod; then scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ - ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' + ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh index dccc4c671dc43..616c122e436ee 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test/openshift-microshift-e2e-router-smoke-test-commands.sh @@ -102,5 +102,5 @@ done set -x scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ -ssh "${INSTANCE_PREFIX}" 'sudo ~/cluster-debug-info.sh' +ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 From 874d0e5bc75d25ecb13f5de162abe66daff0a74e Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sat, 15 Apr 2023 15:32:01 +0200 Subject: [PATCH 18/25] obtain IP afterr starting instance --- .../openshift-microshift-e2e-reboot-tests-verify-commands.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index b4e55f9da7061..26905aafc6efd 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -18,6 +18,8 @@ gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" +gcloud compute instances start "${INSTANCE_PREFIX}" --zone "${GOOGLE_COMPUTE_ZONE}" + IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" mkdir -p "${HOME}"/.ssh @@ -30,8 +32,6 @@ Host ${INSTANCE_PREFIX} EOF chmod 0600 "${HOME}"/.ssh/config -gcloud compute instances start "${INSTANCE_PREFIX}" --zone "${GOOGLE_COMPUTE_ZONE}" - timeout=1200 # 20 minute wait. start=$(date +"%s") until ssh "${INSTANCE_PREFIX}" 'true'; do From 3fe3ba0b1d85bf5b3094435b9b92d457a38d14dc Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sat, 15 Apr 2023 15:32:14 +0200 Subject: [PATCH 19/25] add some lvm debug commands --- .../openshift-microshift-e2e-reboot-tests-commands.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index 06e858c0de999..d802b6c979056 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -98,6 +98,7 @@ scp "${HOME}"/reboot-test.sh "${INSTANCE_PREFIX}":~/reboot-test.sh if ! ssh "${INSTANCE_PREFIX}" 'sudo ~/reboot-test.sh'; then scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' + ssh "${INSTANCE_PREFIX}" 'set -x; sudo lvs; sudo pvs; sudo lvdisplay; sudo vgdisplay;' exit 1 fi From f852caaa16943e4a086ed31d1cf4418091a8a403 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sat, 15 Apr 2023 16:45:33 +0200 Subject: [PATCH 20/25] 4.12 has spare-gb: 10, so provisioning pvc fails --- ...ft-microshift-e2e-reboot-tests-commands.sh | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index d802b6c979056..e0d5e74bbba0b 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -40,20 +40,21 @@ stat $KUBECONFIG oc label namespaces default "pod-security.kubernetes.io/"{enforce,audit,warn}"-version=v1.24" oc label namespaces default "pod-security.kubernetes.io/"{enforce,audit,warn}"=privileged" cat < Date: Sat, 15 Apr 2023 16:49:39 +0200 Subject: [PATCH 21/25] fix ssh - missing target --- .../openshift-microshift-e2e-reboot-tests-verify-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index 26905aafc6efd..08fd0b40094fe 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -42,7 +42,7 @@ until ssh "${INSTANCE_PREFIX}" 'true'; do done >&2 echo "It took $timeout seconds to connect via ssh" -ssh "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig +ssh "${INSTANCE_PREFIX}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig # 180s to accomodate for slow kubelet actions with topolvm pvc after reboot if ! KUBECONFIG=/tmp/kubeconfig oc wait --for=condition=Ready --timeout=180s pod/test-pod; then From e12b9846fe986898ff511a3cbed3b4da10d219bc Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sat, 15 Apr 2023 16:51:12 +0200 Subject: [PATCH 22/25] add ServerAlive{Interval,CountMax} --- .../openshift-microshift-e2e-reboot-tests-commands.sh | 2 ++ .../openshift-microshift-e2e-reboot-tests-verify-commands.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index e0d5e74bbba0b..93c19c3ef7c45 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -27,6 +27,8 @@ Host ${INSTANCE_PREFIX} HostName ${IP_ADDRESS} IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 EOF chmod 0600 "${HOME}"/.ssh/config diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index 08fd0b40094fe..4cbf863169e25 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -29,6 +29,8 @@ Host ${INSTANCE_PREFIX} HostName ${IP_ADDRESS} IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 EOF chmod 0600 "${HOME}"/.ssh/config From 8f39c217a245438fe2d58c057dc8aec446f7f76b Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sat, 15 Apr 2023 17:47:24 +0200 Subject: [PATCH 23/25] after reboot IP changes... --- ...t-microshift-e2e-reboot-tests-verify-commands.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index 4cbf863169e25..6b451f63f5a02 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -44,10 +44,17 @@ until ssh "${INSTANCE_PREFIX}" 'true'; do done >&2 echo "It took $timeout seconds to connect via ssh" -ssh "${INSTANCE_PREFIX}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig - +cat > "${HOME}"/wait_for_pod_ready.sh <<'EOF' +#!/bin/bash +set -xeuo pipefail +export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig # 180s to accomodate for slow kubelet actions with topolvm pvc after reboot -if ! KUBECONFIG=/tmp/kubeconfig oc wait --for=condition=Ready --timeout=180s pod/test-pod; then +oc wait --for=condition=Ready --timeout=120s pod/test-pod +EOF +chmod +x "${HOME}"/wait_for_pod_ready.sh +scp "${HOME}"/wait_for_pod_ready.sh "${INSTANCE_PREFIX}":~/wait_for_pod_ready.sh + +if ! ssh "${INSTANCE_PREFIX}" 'sudo ~/wait_for_pod_ready.sh'; then scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 From c5c6936155fab1600f389c4504cce661be4b016d Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:49:41 +0200 Subject: [PATCH 24/25] don't `oc wait` immediatelly after starting --- ...openshift-microshift-e2e-reboot-tests-commands.sh | 7 +++---- ...ft-microshift-e2e-reboot-tests-verify-commands.sh | 12 ++++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index 93c19c3ef7c45..35e5628793bbe 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -93,6 +93,8 @@ EOF_INNER echo "waiting for pod condition" >&2 oc wait --for=condition=Ready --timeout=120s pod/test-pod + +reboot now EOF chmod +x "${HOME}"/reboot-test.sh @@ -102,7 +104,4 @@ if ! ssh "${INSTANCE_PREFIX}" 'sudo ~/reboot-test.sh'; then scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 -fi - -# now reboot the machine -gcloud compute instances stop "${INSTANCE_PREFIX}" --zone "${GOOGLE_COMPUTE_ZONE}" +fi \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index 6b451f63f5a02..4c1d1c66826a4 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -18,8 +18,6 @@ gcloud --quiet config set project "${GOOGLE_PROJECT_ID}" gcloud --quiet config set compute/zone "${GOOGLE_COMPUTE_ZONE}" gcloud --quiet config set compute/region "${GOOGLE_COMPUTE_REGION}" -gcloud compute instances start "${INSTANCE_PREFIX}" --zone "${GOOGLE_COMPUTE_ZONE}" - IP_ADDRESS="$(gcloud compute instances describe "${INSTANCE_PREFIX}" --format='get(networkInterfaces[0].accessConfigs[0].natIP)')" mkdir -p "${HOME}"/.ssh @@ -42,14 +40,20 @@ until ssh "${INSTANCE_PREFIX}" 'true'; do exit 1 fi done ->&2 echo "It took $timeout seconds to connect via ssh" +>&2 echo "It took $(( $(date +"%s") - start)) seconds to connect via ssh" cat > "${HOME}"/wait_for_pod_ready.sh <<'EOF' #!/bin/bash set -xeuo pipefail + +# block until microshift is ready (according to systemd) +# give extra time for api server to update status of the pods +# (immediatelly after reboot, it thinks they're all Running, but it's out of date) +systemctl start microshift + export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig # 180s to accomodate for slow kubelet actions with topolvm pvc after reboot -oc wait --for=condition=Ready --timeout=120s pod/test-pod +oc wait --for=condition=Ready --timeout=180s pod/test-pod EOF chmod +x "${HOME}"/wait_for_pod_ready.sh scp "${HOME}"/wait_for_pod_ready.sh "${INSTANCE_PREFIX}":~/wait_for_pod_ready.sh From d9914cfa7858ecc42140009178a8efb928e4d3c2 Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Sun, 16 Apr 2023 13:33:43 +0200 Subject: [PATCH 25/25] standalone ssh reboot to keep exit codes separate --- ...ift-microshift-e2e-reboot-tests-commands.sh | 18 +++++++++++++----- ...roshift-e2e-reboot-tests-verify-commands.sh | 13 +++++++------ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh index 35e5628793bbe..ce06ab43d5d0b 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/openshift-microshift-e2e-reboot-tests-commands.sh @@ -88,13 +88,9 @@ spec: # - name: test-vol # persistentVolumeClaim: # claimName: test-claim - EOF_INNER -echo "waiting for pod condition" >&2 oc wait --for=condition=Ready --timeout=120s pod/test-pod - -reboot now EOF chmod +x "${HOME}"/reboot-test.sh @@ -104,4 +100,16 @@ if ! ssh "${INSTANCE_PREFIX}" 'sudo ~/reboot-test.sh'; then scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' exit 1 -fi \ No newline at end of file +fi + +set +e +ssh "${INSTANCE_PREFIX}" 'sudo reboot now' +res=$? +set -e + +# Don't fail on exit code 255 which is ssh's for things like +# "connection closed by remote host" +# which are expected when rebooting via ssh +if [ "${res}" -ne 0 ] && [ "${res}" -ne 255 ]; then + exit 1 +fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh index 4c1d1c66826a4..ec399897e4adf 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests/verify/openshift-microshift-e2e-reboot-tests-verify-commands.sh @@ -40,19 +40,20 @@ until ssh "${INSTANCE_PREFIX}" 'true'; do exit 1 fi done ->&2 echo "It took $(( $(date +"%s") - start)) seconds to connect via ssh" +>&2 echo "It took $(( $(date +'%s') - start)) seconds to connect via ssh" cat > "${HOME}"/wait_for_pod_ready.sh <<'EOF' #!/bin/bash -set -xeuo pipefail +set -euo pipefail -# block until microshift is ready (according to systemd) -# give extra time for api server to update status of the pods -# (immediatelly after reboot, it thinks they're all Running, but it's out of date) +echo "block until microshift is ready (according to systemd)" +echo "give extra time for api server to update status of the pods" +echo "(immediatelly after reboot, it thinks they're all Running, but it's out of date)" +set -x systemctl start microshift export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig -# 180s to accomodate for slow kubelet actions with topolvm pvc after reboot +echo "waiting 180s to accomodate for slow kubelet actions with topolvm pvc after reboot" oc wait --for=condition=Ready --timeout=180s pod/test-pod EOF chmod +x "${HOME}"/wait_for_pod_ready.sh