diff --git a/ci-operator/config/osac-project/osac-installer/osac-project-osac-installer-main.yaml b/ci-operator/config/osac-project/osac-installer/osac-project-osac-installer-main.yaml index 2bc2160f4da32..916785a12c3da 100644 --- a/ci-operator/config/osac-project/osac-installer/osac-project-osac-installer-main.yaml +++ b/ci-operator/config/osac-project/osac-installer/osac-project-osac-installer-main.yaml @@ -27,7 +27,9 @@ images: ADD . /installer WORKDIR /installer - RUN dnf install -y git jq + RUN dnf install -y git jq && \ + curl -fsSL https://get.helm.sh/helm-v3.17.3-linux-amd64.tar.gz | tar xz -C /tmp && \ + mv /tmp/linux-amd64/helm /usr/local/bin/helm RUN git submodule update --init --recursive RUN cp oc /usr/local/bin/oc diff --git a/ci-operator/config/osac-project/osac-test-infra/osac-project-osac-test-infra-main.yaml b/ci-operator/config/osac-project/osac-test-infra/osac-project-osac-test-infra-main.yaml index 76c52924fedb3..a85a1e842f143 100644 --- a/ci-operator/config/osac-project/osac-test-infra/osac-project-osac-test-infra-main.yaml +++ b/ci-operator/config/osac-project/osac-test-infra/osac-project-osac-test-infra-main.yaml @@ -67,118 +67,16 @@ tests: - intranet steps: workflow: osac-project-cluster-tool-vmaas -- as: e2e-metal-vmaas-compute-instance-creation +- as: e2e-vmaas-periodic capabilities: - intranet - cron: 0 2 * * 1 + cron: 0 6,18 * * * steps: - cluster_profile: packet-assisted - env: - ASSISTED_CONFIG: | - OLM_OPERATORS=cnv,lvm - NUM_MASTERS=1 - NUM_WORKERS=0 - MASTER_MEMORY=57344 - MASTER_DISK_COUNT=2 - MASTER_DISK=200000000000 - MASTER_CPU=24 - OPENSHIFT_VERSION=4.20 - TEST: test_compute_instance_creation.py - workflow: osac-project-ofcir-baremetal -- as: e2e-metal-vmaas-compute-instance-api-fields - capabilities: - - intranet - cron: 0 6 * * 1 - steps: - cluster_profile: packet-assisted - env: - ASSISTED_CONFIG: | - OLM_OPERATORS=cnv,lvm - NUM_MASTERS=1 - NUM_WORKERS=0 - MASTER_MEMORY=57344 - MASTER_DISK_COUNT=2 - MASTER_DISK=200000000000 - MASTER_CPU=24 - OPENSHIFT_VERSION=4.20 - TEST: test_compute_instance_api_fields.py - workflow: osac-project-ofcir-baremetal -- as: e2e-metal-vmaas-compute-instance-cli-fields - capabilities: - - intranet - cron: 0 2 * * 2 - steps: - cluster_profile: packet-assisted - env: - ASSISTED_CONFIG: | - OLM_OPERATORS=cnv,lvm - NUM_MASTERS=1 - NUM_WORKERS=0 - MASTER_MEMORY=57344 - MASTER_DISK_COUNT=2 - MASTER_DISK=200000000000 - MASTER_CPU=24 - OPENSHIFT_VERSION=4.20 - TEST: test_compute_instance_cli_fields.py - workflow: osac-project-ofcir-baremetal -- as: e2e-metal-vmaas-compute-instance-delete-during-provision - capabilities: - - intranet - cron: 0 6 * * 2 - steps: - cluster_profile: packet-assisted - env: - ASSISTED_CONFIG: | - OLM_OPERATORS=cnv,lvm - NUM_MASTERS=1 - NUM_WORKERS=0 - MASTER_MEMORY=57344 - MASTER_DISK_COUNT=2 - MASTER_DISK=200000000000 - MASTER_CPU=24 - OPENSHIFT_VERSION=4.20 - TEST: test_compute_instance_delete_during_provision.py - workflow: osac-project-ofcir-baremetal -- as: e2e-metal-vmaas-compute-instance-restart - capabilities: - - intranet - cron: 0 2 * * 3 - steps: - cluster_profile: packet-assisted - env: - ASSISTED_CONFIG: | - OLM_OPERATORS=cnv,lvm - NUM_MASTERS=1 - NUM_WORKERS=0 - MASTER_MEMORY=57344 - MASTER_DISK_COUNT=2 - MASTER_DISK=200000000000 - MASTER_CPU=24 - OPENSHIFT_VERSION=4.20 - TEST: test_compute_instance_restart.py - workflow: osac-project-ofcir-baremetal -- as: e2e-metal-vmaas-compute-instance-restart-negative - capabilities: - - intranet - cron: 0 6 * * 3 - steps: - cluster_profile: packet-assisted - env: - ASSISTED_CONFIG: | - OLM_OPERATORS=cnv,lvm - NUM_MASTERS=1 - NUM_WORKERS=0 - MASTER_MEMORY=57344 - MASTER_DISK_COUNT=2 - MASTER_DISK=200000000000 - MASTER_CPU=24 - OPENSHIFT_VERSION=4.20 - TEST: test_compute_instance_restart_negative.py - workflow: osac-project-ofcir-baremetal -- as: e2e-metal-vmaas-subnet-lifecycle + workflow: osac-project-cluster-tool-vmaas +- as: e2e-vmaas-full-setup-kustomize capabilities: - intranet - cron: 0 2 * * 4 + cron: 0 0 * * * steps: cluster_profile: packet-assisted env: @@ -191,12 +89,11 @@ tests: MASTER_DISK=200000000000 MASTER_CPU=24 OPENSHIFT_VERSION=4.20 - TEST: test_subnet_lifecycle.py workflow: osac-project-ofcir-baremetal -- as: e2e-metal-vmaas-virtual-network-lifecycle +- as: e2e-vmaas-full-setup-helm capabilities: - intranet - cron: 0 6 * * 4 + cron: 0 0 * * * steps: cluster_profile: packet-assisted env: @@ -209,7 +106,8 @@ tests: MASTER_DISK=200000000000 MASTER_CPU=24 OPENSHIFT_VERSION=4.20 - TEST: test_virtual_network_lifecycle.py + DEPLOY_MODE: helm + NOTIFY_LABEL: Full Setup vmaas (helm) workflow: osac-project-ofcir-baremetal zz_generated_metadata: branch: main diff --git a/ci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-periodics.yaml b/ci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-periodics.yaml index 0f6874ef2bb98..11acb9ea426c2 100644 --- a/ci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-periodics.yaml +++ b/ci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-periodics.yaml @@ -1,7 +1,7 @@ periodics: - agent: kubernetes cluster: build03 - cron: 0 6 * * 1 + cron: 0 0 * * * decorate: true decoration_config: sparse_checkout_files: @@ -19,7 +19,7 @@ periodics: ci.openshift.io/generator: prowgen job-release: "4.20" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-compute-instance-api-fields + name: periodic-ci-osac-project-osac-test-infra-main-e2e-vmaas-full-setup-helm spec: containers: - args: @@ -28,7 +28,7 @@ periodics: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=e2e-metal-vmaas-compute-instance-api-fields + - --target=e2e-vmaas-full-setup-helm command: - ci-operator env: @@ -86,7 +86,7 @@ periodics: secretName: result-aggregator - agent: kubernetes cluster: build03 - cron: 0 2 * * 2 + cron: 0 0 * * * decorate: true decoration_config: sparse_checkout_files: @@ -104,7 +104,7 @@ periodics: ci.openshift.io/generator: prowgen job-release: "4.20" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-compute-instance-cli-fields + name: periodic-ci-osac-project-osac-test-infra-main-e2e-vmaas-full-setup-kustomize spec: containers: - args: @@ -113,7 +113,7 @@ periodics: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=e2e-metal-vmaas-compute-instance-cli-fields + - --target=e2e-vmaas-full-setup-kustomize command: - ci-operator env: @@ -171,7 +171,7 @@ periodics: secretName: result-aggregator - agent: kubernetes cluster: build03 - cron: 0 2 * * 1 + cron: 0 6,18 * * * decorate: true decoration_config: sparse_checkout_files: @@ -184,437 +184,10 @@ periodics: - Containerfile labels: capability/intranet: intranet - ci-operator.openshift.io/cloud: packet-edge - ci-operator.openshift.io/cloud-cluster-profile: packet-assisted - ci.openshift.io/generator: prowgen - job-release: "4.20" - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-compute-instance-creation - 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 - - --target=e2e-metal-vmaas-compute-instance-creation - command: - - ci-operator - env: - - name: HTTP_SERVER_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest - imagePullPolicy: Always - name: "" - ports: - - containerPort: 8080 - name: http - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /secrets/manifest-tool - name: manifest-tool-local-pusher - 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: manifest-tool-local-pusher - secret: - secretName: manifest-tool-local-pusher - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator -- agent: kubernetes - cluster: build03 - cron: 0 6 * * 2 - decorate: true - decoration_config: - sparse_checkout_files: - - Containerfile - extra_refs: - - base_ref: main - org: osac-project - repo: osac-test-infra - sparse_checkout_files: - - Containerfile - labels: - capability/intranet: intranet - ci-operator.openshift.io/cloud: packet-edge - ci-operator.openshift.io/cloud-cluster-profile: packet-assisted - ci.openshift.io/generator: prowgen - job-release: "4.20" - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-compute-instance-delete-during-provision - 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 - - --target=e2e-metal-vmaas-compute-instance-delete-during-provision - command: - - ci-operator - env: - - name: HTTP_SERVER_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest - imagePullPolicy: Always - name: "" - ports: - - containerPort: 8080 - name: http - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /secrets/manifest-tool - name: manifest-tool-local-pusher - 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: manifest-tool-local-pusher - secret: - secretName: manifest-tool-local-pusher - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator -- agent: kubernetes - cluster: build03 - cron: 0 2 * * 3 - decorate: true - decoration_config: - sparse_checkout_files: - - Containerfile - extra_refs: - - base_ref: main - org: osac-project - repo: osac-test-infra - sparse_checkout_files: - - Containerfile - labels: - capability/intranet: intranet - ci-operator.openshift.io/cloud: packet-edge - ci-operator.openshift.io/cloud-cluster-profile: packet-assisted - ci.openshift.io/generator: prowgen - job-release: "4.20" - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-compute-instance-restart - 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 - - --target=e2e-metal-vmaas-compute-instance-restart - command: - - ci-operator - env: - - name: HTTP_SERVER_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest - imagePullPolicy: Always - name: "" - ports: - - containerPort: 8080 - name: http - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /secrets/manifest-tool - name: manifest-tool-local-pusher - 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: manifest-tool-local-pusher - secret: - secretName: manifest-tool-local-pusher - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator -- agent: kubernetes - cluster: build03 - cron: 0 6 * * 3 - decorate: true - decoration_config: - sparse_checkout_files: - - Containerfile - extra_refs: - - base_ref: main - org: osac-project - repo: osac-test-infra - sparse_checkout_files: - - Containerfile - labels: - capability/intranet: intranet - ci-operator.openshift.io/cloud: packet-edge - ci-operator.openshift.io/cloud-cluster-profile: packet-assisted - ci.openshift.io/generator: prowgen - job-release: "4.20" - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-compute-instance-restart-negative - 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 - - --target=e2e-metal-vmaas-compute-instance-restart-negative - command: - - ci-operator - env: - - name: HTTP_SERVER_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest - imagePullPolicy: Always - name: "" - ports: - - containerPort: 8080 - name: http - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /secrets/manifest-tool - name: manifest-tool-local-pusher - 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: manifest-tool-local-pusher - secret: - secretName: manifest-tool-local-pusher - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator -- agent: kubernetes - cluster: build03 - cron: 0 2 * * 4 - decorate: true - decoration_config: - sparse_checkout_files: - - Containerfile - extra_refs: - - base_ref: main - org: osac-project - repo: osac-test-infra - sparse_checkout_files: - - Containerfile - labels: - capability/intranet: intranet - ci-operator.openshift.io/cloud: packet-edge - ci-operator.openshift.io/cloud-cluster-profile: packet-assisted - ci.openshift.io/generator: prowgen - job-release: "4.20" - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-subnet-lifecycle - 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 - - --target=e2e-metal-vmaas-subnet-lifecycle - command: - - ci-operator - env: - - name: HTTP_SERVER_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest - imagePullPolicy: Always - name: "" - ports: - - containerPort: 8080 - name: http - resources: - requests: - cpu: 10m - volumeMounts: - - mountPath: /etc/boskos - name: boskos - readOnly: true - - mountPath: /secrets/ci-pull-credentials - name: ci-pull-credentials - readOnly: true - - mountPath: /secrets/gcs - name: gcs-credentials - readOnly: true - - mountPath: /secrets/manifest-tool - name: manifest-tool-local-pusher - 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: manifest-tool-local-pusher - secret: - secretName: manifest-tool-local-pusher - - name: pull-secret - secret: - secretName: registry-pull-credentials - - name: result-aggregator - secret: - secretName: result-aggregator -- agent: kubernetes - cluster: build03 - cron: 0 6 * * 4 - decorate: true - decoration_config: - sparse_checkout_files: - - Containerfile - extra_refs: - - base_ref: main - org: osac-project - repo: osac-test-infra - sparse_checkout_files: - - Containerfile - labels: - capability/intranet: intranet - ci-operator.openshift.io/cloud: packet-edge - ci-operator.openshift.io/cloud-cluster-profile: packet-assisted ci.openshift.io/generator: prowgen job-release: "4.20" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-osac-project-osac-test-infra-main-e2e-metal-vmaas-virtual-network-lifecycle + name: periodic-ci-osac-project-osac-test-infra-main-e2e-vmaas-periodic spec: containers: - args: @@ -623,7 +196,7 @@ periodics: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=e2e-metal-vmaas-virtual-network-lifecycle + - --target=e2e-vmaas-periodic command: - ci-operator env: diff --git a/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-commands.sh b/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-commands.sh index 1157917703246..7f22c95bd03cc 100644 --- a/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-commands.sh +++ b/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-commands.sh @@ -4,16 +4,37 @@ set -o nounset set -o errexit set -o pipefail -echo "Running OSAC E2E test: ${TEST}" +echo "Running OSAC E2E tests: suite=${TEST_SUITE}" -timeout -s 9 60m ssh -F "${SHARED_DIR}/ssh_config" ci_machine bash -s "${TEST}" "${E2E_NAMESPACE}" "${E2E_VM_TEMPLATE}" "${E2E_CLUSTER_TEMPLATE}" "${OSAC_TEST_IMAGE}" <<'REMOTE_EOF' +REMOTE_RESULTS_DIR="/tmp/test-results" + +function collect_artifacts() { + echo "Collecting test artifacts..." + timeout -s 9 2m scp -F "${SHARED_DIR}/ssh_config" \ + "ci_machine:${REMOTE_RESULTS_DIR}/junit_${TEST_SUITE}.xml" \ + "${ARTIFACT_DIR}/junit_${TEST_SUITE}.xml" 2>/dev/null || true +} +trap collect_artifacts EXIT + +TEST_EXIT=0 +timeout -s 9 60m ssh -F "${SHARED_DIR}/ssh_config" ci_machine bash -s \ + "${TEST_SUITE}" \ + "${E2E_NAMESPACE}" \ + "${E2E_VM_TEMPLATE}" \ + "${E2E_CLUSTER_TEMPLATE}" \ + "${OSAC_TEST_IMAGE}" \ + "${REMOTE_RESULTS_DIR}" \ + <<'REMOTE_EOF' || TEST_EXIT=$? set -euo pipefail -TEST="$1" +TEST_SUITE="$1" E2E_NAMESPACE="$2" E2E_VM_TEMPLATE="$3" E2E_CLUSTER_TEMPLATE="$4" OSAC_TEST_IMAGE="$5" +RESULTS_DIR="$6" + +mkdir -p "${RESULTS_DIR}" KUBECONFIG=$(find ${KUBECONFIG} -type f -print -quit 2>/dev/null) [[ -z "${KUBECONFIG}" ]] && echo "ERROR: No kubeconfig found" && exit 1 @@ -24,6 +45,7 @@ set +x podman run --authfile "${PULL_SECRET_PATH}" --rm --network=host \ -v "${KUBECONFIG}:/root/.kube/config:z" \ -v "${PULL_SECRET_PATH}:/root/pull-secret:z" \ + -v "${RESULTS_DIR}":/tmp/test-results:z \ -e KUBECONFIG=/root/.kube/config \ -e OSAC_VM_KUBECONFIG=/root/.kube/config \ -e OSAC_NAMESPACE="${E2E_NAMESPACE}" \ @@ -31,7 +53,14 @@ podman run --authfile "${PULL_SECRET_PATH}" --rm --network=host \ -e OSAC_CLUSTER_TEMPLATE="${E2E_CLUSTER_TEMPLATE}" \ -e OSAC_PULL_SECRET_PATH=/root/pull-secret \ "${OSAC_TEST_IMAGE}" \ - make test TEST="${TEST}" + pytest "tests/${TEST_SUITE}/" -v --junitxml="/tmp/test-results/junit_${TEST_SUITE}.xml" REMOTE_EOF -echo "Test completed" +if [[ "${TEST_EXIT}" -ne 0 ]]; then + echo "FAILED" > "${SHARED_DIR}/test-result" + echo "Some tests failed (exit code: ${TEST_EXIT})" + exit "${TEST_EXIT}" +fi + +echo "PASSED" > "${SHARED_DIR}/test-result" +echo "All tests passed." diff --git a/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-ref.yaml b/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-ref.yaml index e130a64353435..3ea72e0260fa3 100644 --- a/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-ref.yaml +++ b/ci-operator/step-registry/osac-project/baremetal/test/osac-project-baremetal-test-ref.yaml @@ -12,8 +12,9 @@ ref: cpu: 100m memory: 200Mi env: - - name: TEST - documentation: The test file to run (e.g. test_compute_instance_creation.py) + - name: TEST_SUITE + default: "vmaas" + documentation: Test suite to run (matches tests// directory, e.g. vmaas or caas) - name: E2E_NAMESPACE default: "osac-e2e-ci" documentation: The namespace to use for the e2e tests diff --git a/ci-operator/step-registry/osac-project/cluster-tool/test/osac-project-cluster-tool-test-commands.sh b/ci-operator/step-registry/osac-project/cluster-tool/test/osac-project-cluster-tool-test-commands.sh index 3a06b4e39eb15..af26884760ad1 100644 --- a/ci-operator/step-registry/osac-project/cluster-tool/test/osac-project-cluster-tool-test-commands.sh +++ b/ci-operator/step-registry/osac-project/cluster-tool/test/osac-project-cluster-tool-test-commands.sh @@ -82,8 +82,10 @@ echo "Tests completed." REMOTE_EOF if [[ "${TEST_EXIT}" -ne 0 ]]; then + echo "FAILED" > "${SHARED_DIR}/test-result" echo "Some tests failed (exit code: ${TEST_EXIT})" exit "${TEST_EXIT}" fi +echo "PASSED" > "${SHARED_DIR}/test-result" echo "All tests passed." diff --git a/ci-operator/step-registry/osac-project/cluster-tool/vmaas/osac-project-cluster-tool-vmaas-workflow.yaml b/ci-operator/step-registry/osac-project/cluster-tool/vmaas/osac-project-cluster-tool-vmaas-workflow.yaml index 813c246152bcc..410270bac884f 100644 --- a/ci-operator/step-registry/osac-project/cluster-tool/vmaas/osac-project-cluster-tool-vmaas-workflow.yaml +++ b/ci-operator/step-registry/osac-project/cluster-tool/vmaas/osac-project-cluster-tool-vmaas-workflow.yaml @@ -11,12 +11,14 @@ workflow: test: - ref: osac-project-cluster-tool-test post: + - ref: osac-project-notify - ref: osac-project-gather - ref: osac-project-cluster-tool-destroy - ref: ofcir-gather - ref: ofcir-release env: CLUSTERTYPE: "assisted_large_el9" + NOTIFY_LABEL: "E2E vmaas" documentation: |- Boots an OSAC cluster from a pre-built snapshot via cluster-tool, runs the refresh script to fix domain-sensitive resources, then diff --git a/ci-operator/step-registry/osac-project/installer/osac-project-installer-commands.sh b/ci-operator/step-registry/osac-project/installer/osac-project-installer-commands.sh index e2af4ab09b036..b4804288d2723 100644 --- a/ci-operator/step-registry/osac-project/installer/osac-project-installer-commands.sh +++ b/ci-operator/step-registry/osac-project/installer/osac-project-installer-commands.sh @@ -42,6 +42,9 @@ podman run --authfile /root/pull-secret --rm --network=host \ -e INSTALLER_NAMESPACE=${E2E_NAMESPACE} \ -e INSTALLER_KUSTOMIZE_OVERLAY=${E2E_KUSTOMIZE_OVERLAY} \ -e INSTALLER_VM_TEMPLATE=${E2E_VM_TEMPLATE} \ +-e DEPLOY_MODE=${DEPLOY_MODE} \ +-e VALUES_FILE=${VALUES_FILE} \ +-e INGRESS_SERVICE=${INGRESS_SERVICE} \ ${OSAC_INSTALLER_IMAGE} sh /installer/scripts/setup.sh EOF diff --git a/ci-operator/step-registry/osac-project/installer/osac-project-installer-ref.yaml b/ci-operator/step-registry/osac-project/installer/osac-project-installer-ref.yaml index 84a88205efb76..45f24a76679c8 100644 --- a/ci-operator/step-registry/osac-project/installer/osac-project-installer-ref.yaml +++ b/ci-operator/step-registry/osac-project/installer/osac-project-installer-ref.yaml @@ -25,3 +25,12 @@ ref: - name: E2E_VM_TEMPLATE default: "osac.templates.ocp_virt_vm" documentation: The template to use for the e2e tests + - name: DEPLOY_MODE + default: "kustomize" + documentation: Deploy mode for osac-installer (kustomize or helm) + - name: VALUES_FILE + default: "values/vmaas-ci.yaml" + documentation: Helm values file to use (helm mode only) + - name: INGRESS_SERVICE + default: "true" + documentation: Install MetalLB as the ingress/LoadBalancer service diff --git a/ci-operator/step-registry/osac-project/notify/osac-project-notify-commands.sh b/ci-operator/step-registry/osac-project/notify/osac-project-notify-commands.sh index 2d857ba83558d..35acb37b1e580 100755 --- a/ci-operator/step-registry/osac-project/notify/osac-project-notify-commands.sh +++ b/ci-operator/step-registry/osac-project/notify/osac-project-notify-commands.sh @@ -30,7 +30,8 @@ if [[ -f "${SHARED_DIR}/versions.txt" ]]; then done < "${SHARED_DIR}/versions.txt" fi -MESSAGE="${EMOJI} *${JOB_NAME}* — ${RESULT}\n<${JOB_URL}|View logs>" +LABEL="${NOTIFY_LABEL:-${JOB_NAME}}" +MESSAGE="${EMOJI} *${LABEL}* — ${RESULT}\n<${JOB_URL}|View logs>" if [[ -n "${VERSIONS}" ]]; then MESSAGE="${MESSAGE}\n\n*Versions:*\n\`\`\`${VERSIONS}\n\`\`\`" fi diff --git a/ci-operator/step-registry/osac-project/notify/osac-project-notify-ref.yaml b/ci-operator/step-registry/osac-project/notify/osac-project-notify-ref.yaml index 148ff6b1092de..31bd3d983eb9d 100644 --- a/ci-operator/step-registry/osac-project/notify/osac-project-notify-ref.yaml +++ b/ci-operator/step-registry/osac-project/notify/osac-project-notify-ref.yaml @@ -12,5 +12,9 @@ ref: requests: cpu: 100m memory: 200Mi + env: + - name: NOTIFY_LABEL + default: "" + documentation: Custom label for the Slack notification header. If empty, uses JOB_NAME. documentation: |- Sends a Slack notification with the job result and a link to the Prow logs. diff --git a/ci-operator/step-registry/osac-project/ofcir/baremetal/osac-project-ofcir-baremetal-workflow.yaml b/ci-operator/step-registry/osac-project/ofcir/baremetal/osac-project-ofcir-baremetal-workflow.yaml index c5091b0990066..ec0c05794a038 100644 --- a/ci-operator/step-registry/osac-project/ofcir/baremetal/osac-project-ofcir-baremetal-workflow.yaml +++ b/ci-operator/step-registry/osac-project/ofcir/baremetal/osac-project-ofcir-baremetal-workflow.yaml @@ -12,10 +12,12 @@ workflow: test: - ref: osac-project-baremetal-test post: + - ref: osac-project-notify - ref: osac-project-gather - ref: ofcir-gather - ref: ofcir-release env: - CLUSTERTYPE: "assisted_medium_el9" + CLUSTERTYPE: "assisted_large_el9" + NOTIFY_LABEL: "Full Setup vmaas (kustomize)" documentation: |- This workflow executes the common end-to-end osac-test-infra test suite on a cluster provisioned by running assisted-installer on a packet server.