diff --git a/ci-operator/config/quay/quay-operator/quay-quay-operator-master__ocp-latest.yaml b/ci-operator/config/quay/quay-operator/quay-quay-operator-master__ocp-latest.yaml index 0cf01fde85382..558fa260c8aa7 100644 --- a/ci-operator/config/quay/quay-operator/quay-quay-operator-master__ocp-latest.yaml +++ b/ci-operator/config/quay/quay-operator/quay-quay-operator-master__ocp-latest.yaml @@ -71,8 +71,7 @@ tests: cluster_profile: openshift-org-aws env: COMPUTE_NODE_TYPE: m5.4xlarge - DEST_REPO: admin/quay:latest - SOURCE_IMAGE: quay.io/projectquay/quay:latest + SETUP_NOOBAA: "true" post: - ref: quay-gather - chain: ipi-aws-post @@ -80,10 +79,8 @@ tests: - chain: ipi-aws-pre - ref: quay-install-odf-operator - ref: quay-install-operator-bundle - - ref: quay-install-quay - - ref: quay-create-admin-user test: - - ref: quay-test-mirror-image + - ref: quay-test-chainsaw workflow: ipi-aws - always_run: false as: e2e-upgrade diff --git a/ci-operator/config/quay/quay-operator/quay-quay-operator-redhat-3.17__ocp-latest.yaml b/ci-operator/config/quay/quay-operator/quay-quay-operator-redhat-3.17__ocp-latest.yaml index 2a4dc43fa2f87..71bf6c7eb2c50 100644 --- a/ci-operator/config/quay/quay-operator/quay-quay-operator-redhat-3.17__ocp-latest.yaml +++ b/ci-operator/config/quay/quay-operator/quay-quay-operator-redhat-3.17__ocp-latest.yaml @@ -63,6 +63,7 @@ tests: cluster_profile: openshift-org-aws env: COMPUTE_NODE_TYPE: m5.4xlarge + SETUP_NOOBAA: "true" post: - ref: quay-gather - chain: ipi-aws-post @@ -70,10 +71,8 @@ tests: - chain: ipi-aws-pre - ref: quay-install-odf-operator - ref: quay-install-operator-bundle - - ref: quay-install-quay - - ref: quay-create-admin-user test: - - ref: quay-test-mirror-image + - ref: quay-test-chainsaw workflow: ipi-aws zz_generated_metadata: branch: redhat-3.17 diff --git a/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-commands.sh b/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-commands.sh index 7e96ce6c15ea3..8970717214745 100755 --- a/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-commands.sh +++ b/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-commands.sh @@ -56,10 +56,125 @@ for _ in {1..60}; do if [[ -n "$CSV" ]]; then if [[ "$(oc -n "$OO_INSTALL_NAMESPACE" get csv "$CSV" -o jsonpath='{.status.phase}')" == "Succeeded" ]]; then echo "ClusterServiceVersion \"$CSV\" ready" - exit 0 + CSV_READY=true + break fi fi sleep 10 done -echo "Timed out waiting for CSV to become ready" -exit 1 + +if [[ "${CSV_READY:-}" != "true" ]]; then + echo "Timed out waiting for CSV to become ready" + exit 1 +fi + +if [[ "${SETUP_NOOBAA:-false}" != "true" ]]; then + echo "SETUP_NOOBAA not enabled, skipping NooBaa setup" + exit 0 +fi + +echo "Waiting for NooBaa CRD to be available..." +TIMEOUT=300 +ELAPSED=0 +while [ "$ELAPSED" -lt "$TIMEOUT" ]; do + if oc get crd noobaas.noobaa.io > /dev/null 2>&1; then + echo "NooBaa CRD is available" + break + fi + sleep 10 + ELAPSED=$((ELAPSED + 10)) +done +if ! oc get crd noobaas.noobaa.io > /dev/null 2>&1; then + echo "ERROR: NooBaa CRD not available within ${TIMEOUT}s" + oc get csv -n "$OO_INSTALL_NAMESPACE" 2>&1 || true + exit 1 +fi + +echo "Creating NooBaa..." +cat <&1 || true + oc get pods -n "$OO_INSTALL_NAMESPACE" 2>&1 || true + exit 1 +fi + +echo "Creating PV-pool backing store..." +cat </dev/null || echo "NotFound") + if [ "$BS_PHASE" = "Ready" ]; then + echo "Default backing store is ready" + break + fi + echo " [${i}0s] Backing store phase: $BS_PHASE" + sleep 10 +done +if [ "$BS_PHASE" != "Ready" ]; then + echo "WARNING: Backing store not ready (phase: $BS_PHASE), proceeding anyway" + oc get backingstore -n "$OO_INSTALL_NAMESPACE" -o yaml 2>&1 || true +fi + +echo "NooBaa setup complete" diff --git a/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-ref.yaml b/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-ref.yaml index 22865823028a1..743548633df9d 100644 --- a/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-ref.yaml +++ b/ci-operator/step-registry/quay/install-odf-operator/quay-install-odf-operator-ref.yaml @@ -6,5 +6,10 @@ ref: requests: cpu: 10m memory: 100Mi + env: + - name: SETUP_NOOBAA + default: "false" + documentation: When true, create a NooBaa CR with backing store and bucket class after ODF installation. documentation: |- - Install OpenShift Container Storage Operator + Install OpenShift Data Foundation Operator. Optionally sets up NooBaa + object storage with a PV-pool backing store when SETUP_NOOBAA=true. diff --git a/ci-operator/step-registry/quay/test-chainsaw/OWNERS b/ci-operator/step-registry/quay/test-chainsaw/OWNERS new file mode 120000 index 0000000000000..ec405d65a79df --- /dev/null +++ b/ci-operator/step-registry/quay/test-chainsaw/OWNERS @@ -0,0 +1 @@ +../OWNERS \ No newline at end of file diff --git a/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-commands.sh b/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-commands.sh new file mode 100644 index 0000000000000..1836e9d9e3434 --- /dev/null +++ b/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-commands.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -euo pipefail + +echo "Symlinking oc as kubectl..." +mkdir -p /tmp/bin +ln -sf "$(which oc)" /tmp/bin/kubectl +export PATH="/tmp/bin:${PATH}" + +echo "Installing crane..." +GOFLAGS="" go install github.com/google/go-containerregistry/cmd/crane@latest + +echo "Downloading chainsaw..." +mkdir -p bin +make chainsaw + +REPORT_ARGS="--report-path ${ARTIFACT_DIR} --report-format XML" +ASSERT_TIMEOUT="--assert-timeout 20m" + +echo "Running chainsaw e2e tests..." +make test-e2e CHAINSAW_PARALLEL=1 CHAINSAW_EXTRA_ARGS="--report-name junit_chainsaw_e2e ${REPORT_ARGS} ${ASSERT_TIMEOUT}" + +echo "Running chainsaw ca-rotation tests..." +make test-e2e-destructive CHAINSAW_PARALLEL=1 CHAINSAW_EXTRA_ARGS="--report-name junit_chainsaw_ca_rotation ${REPORT_ARGS} ${ASSERT_TIMEOUT}" + +echo "Chainsaw e2e tests completed" diff --git a/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-ref.metadata.json b/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-ref.metadata.json new file mode 100644 index 0000000000000..f6fea14e43af2 --- /dev/null +++ b/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-ref.metadata.json @@ -0,0 +1,20 @@ +{ + "path": "quay/test-chainsaw/quay-test-chainsaw-ref.yaml", + "owners": { + "approvers": [ + "BillDett", + "HammerMeetNail", + "LiZhang19817", + "SeanZhao-redhat", + "aroyoredhat", + "cubismod", + "dongboyan77", + "huweihua-redhat", + "jbpratt", + "kleesc", + "lechuk47", + "sunandadadi", + "syed" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-ref.yaml b/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-ref.yaml new file mode 100644 index 0000000000000..30ed105df319b --- /dev/null +++ b/ci-operator/step-registry/quay/test-chainsaw/quay-test-chainsaw-ref.yaml @@ -0,0 +1,13 @@ +ref: + as: quay-test-chainsaw + from: src-oc + commands: quay-test-chainsaw-commands.sh + resources: + requests: + cpu: 100m + memory: 200Mi + timeout: 1h + documentation: |- + Runs Chainsaw e2e tests for the quay-operator from the source repo. + Executes reconcile and HPA test suites against an OpenShift cluster + with ODF and the quay operator bundle installed.