diff --git a/ci-operator/config/quay/quay-tests/quay-quay-tests-master__ocp-4.22-quay-lp-interop.yaml b/ci-operator/config/quay/quay-tests/quay-quay-tests-master__ocp-4.22-quay-lpGA-lp-ocp-compat.yaml similarity index 96% rename from ci-operator/config/quay/quay-tests/quay-quay-tests-master__ocp-4.22-quay-lp-interop.yaml rename to ci-operator/config/quay/quay-tests/quay-quay-tests-master__ocp-4.22-quay-lpGA-lp-ocp-compat.yaml index 0d98ad921ccbf..486046f1d6ed9 100644 --- a/ci-operator/config/quay/quay-tests/quay-quay-tests-master__ocp-4.22-quay-lp-interop.yaml +++ b/ci-operator/config/quay/quay-tests/quay-quay-tests-master__ocp-4.22-quay-lpGA-lp-ocp-compat.yaml @@ -30,7 +30,7 @@ resources: cpu: 100m memory: 200Mi tests: -- as: cr-quay-e2e-tests-aws +- as: cr--quay--e2e-tests-aws cron: 0 3,15 * * * steps: cluster_profile: aws-cspi-qe @@ -38,6 +38,7 @@ tests: BASE_DOMAIN: cspilp.interop.ccitredhat.com COMPUTE_NODE_TYPE: m5.4xlarge CSO_CHANNEL: stable-3.16 + DR__RP__CR_COMP_NAME: lp-ocp-compat--Quay FIREWATCH_CONFIG: | { "failure_rules": @@ -57,7 +58,6 @@ tests: QBO_CHANNEL: stable-3.16 QUAY_OPERATOR_CHANNEL: stable-3.16 QUAY_VERSION: "3.16" - REPORTPORTAL_CMP: Quay-lp-interop USER_TAGS: | scenario quay post: @@ -86,6 +86,7 @@ tests: BASE_DOMAIN: cspilp.interop.ccitredhat.com COMPUTE_NODE_TYPE: m5.4xlarge CSO_CHANNEL: stable-3.16 + DR__RP__CR_COMP_NAME: lp-ocp-compat--Quay FIPS_ENABLED: "true" FIREWATCH_CONFIG: | { @@ -105,7 +106,6 @@ tests: QBO_CHANNEL: stable-3.16 QUAY_OPERATOR_CHANNEL: stable-3.16 QUAY_VERSION: "3.16" - REPORTPORTAL_CMP: Quay-lp-interop USER_TAGS: | scenario quay post: @@ -124,6 +124,7 @@ tests: BASE_DOMAIN: quayqe.devcluster.openshift.com COMPUTE_NODE_TYPE: m5.4xlarge CSO_CHANNEL: stable-3.16 + DR__RP__CR_COMP_NAME: lp-ocp-compat--Quay QBO_CHANNEL: stable-3.16 QUAY_OPERATOR_CHANNEL: stable-3.16 QUAY_OPERATOR_SOURCE: redhat-operators @@ -142,4 +143,4 @@ zz_generated_metadata: branch: master org: quay repo: quay-tests - variant: ocp-4.22-quay-lp-interop + variant: ocp-4.22-quay-lpGA-lp-ocp-compat diff --git a/ci-operator/jobs/quay/quay-tests/quay-quay-tests-master-periodics.yaml b/ci-operator/jobs/quay/quay-tests/quay-quay-tests-master-periodics.yaml index c3598b4b6d0ea..059e868598676 100644 --- a/ci-operator/jobs/quay/quay-tests/quay-quay-tests-master-periodics.yaml +++ b/ci-operator/jobs/quay/quay-tests/quay-quay-tests-master-periodics.yaml @@ -203,11 +203,11 @@ periodics: labels: ci-operator.openshift.io/cloud: aws ci-operator.openshift.io/cloud-cluster-profile: aws-cspi-qe - ci-operator.openshift.io/variant: ocp-4.22-quay-lp-interop + ci-operator.openshift.io/variant: ocp-4.22-quay-lpGA-lp-ocp-compat ci.openshift.io/generator: prowgen job-release: "4.22" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lp-interop-aws-fips + name: periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lpGA-lp-ocp-compat-aws-fips reporter_config: slack: channel: '#quay-qe' @@ -229,7 +229,7 @@ periodics: - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - --target=aws-fips - - --variant=ocp-4.22-quay-lp-interop + - --variant=ocp-4.22-quay-lpGA-lp-ocp-compat command: - ci-operator env: @@ -304,11 +304,11 @@ periodics: labels: ci-operator.openshift.io/cloud: aws ci-operator.openshift.io/cloud-cluster-profile: aws-cspi-qe - ci-operator.openshift.io/variant: ocp-4.22-quay-lp-interop + ci-operator.openshift.io/variant: ocp-4.22-quay-lpGA-lp-ocp-compat ci.openshift.io/generator: prowgen job-release: "4.22" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lp-interop-cr-quay-e2e-tests-aws + name: periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lpGA-lp-ocp-compat-cr--quay--e2e-tests-aws spec: containers: - args: @@ -318,8 +318,8 @@ periodics: - --oauth-token-path=/usr/local/github-credentials/oauth - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --target=cr-quay-e2e-tests-aws - - --variant=ocp-4.22-quay-lp-interop + - --target=cr--quay--e2e-tests-aws + - --variant=ocp-4.22-quay-lpGA-lp-ocp-compat command: - ci-operator env: @@ -394,11 +394,11 @@ periodics: labels: ci-operator.openshift.io/cloud: aws ci-operator.openshift.io/cloud-cluster-profile: aws-quay-qe - ci-operator.openshift.io/variant: ocp-4.22-quay-lp-interop + ci-operator.openshift.io/variant: ocp-4.22-quay-lpGA-lp-ocp-compat ci.openshift.io/generator: prowgen job-release: "4.22" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lp-interop-quay-e2e-tests-quay316-ocp422-aws-s3 + name: periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lpGA-lp-ocp-compat-quay-e2e-tests-quay316-ocp422-aws-s3 spec: containers: - args: @@ -409,7 +409,7 @@ periodics: - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - --target=quay-e2e-tests-quay316-ocp422-aws-s3 - - --variant=ocp-4.22-quay-lp-interop + - --variant=ocp-4.22-quay-lpGA-lp-ocp-compat command: - ci-operator env: diff --git a/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-commands.sh b/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-commands.sh index 4b2e048c9f01f..4c05d8401939c 100644 --- a/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-commands.sh +++ b/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-commands.sh @@ -4,6 +4,18 @@ set -o nounset set -o errexit set -o pipefail +if [ "${MAP_TESTS}" = "true" ]; then + eval "$( + typeset -a _fURL=() + type -t wget 1>/dev/null && _fURL=(wget -qO-) || _fURL=(curl -fsSL) + "${_fURL[@]}" \ + https://raw.githubusercontent.com/RedHatQE/OpenShift-LP-QE--Tools/refs/heads/main/libs/bash/ci-operator/interop/common/ExitTrap--PostProcessPrep.sh + )"; trap ' + LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \ + ExitTrap--PostProcessPrep junit--quay-tests__cso-qe-test__quay-tests-cso-qe-test.xml + ' EXIT +fi + #Install CSO CSO_CHANNEL="$CSO_CHANNEL" CSO_SOURCE="$CSO_SOURCE" diff --git a/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-ref.yaml b/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-ref.yaml index ddc729b1c5197..90cf6adc50e98 100644 --- a/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-ref.yaml +++ b/ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-ref.yaml @@ -19,6 +19,12 @@ ref: documentation: |- Execute CSO QE testing env: + - name: DR__RP__CR_COMP_NAME + default: "lp-ocp-compat--Quay" + documentation: ReportPortal Component Readiness component name for junit remapping + - name: MAP_TESTS + default: "false" + documentation: Specify whether to update the test suite name for reporting tools - name: CSO_CHANNEL documentation: The container security operator channel default: "stable-3.8" diff --git a/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-commands.sh b/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-commands.sh index 2915b4d87bbe3..156b02419cd2a 100644 --- a/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-commands.sh +++ b/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-commands.sh @@ -4,6 +4,18 @@ set -o nounset set -o errexit set -o pipefail +if [ "${MAP_TESTS}" = "true" ]; then + eval "$( + typeset -a _fURL=() + type -t wget 1>/dev/null && _fURL=(wget -qO-) || _fURL=(curl -fsSL) + "${_fURL[@]}" \ +https://raw.githubusercontent.com/RedHatQE/OpenShift-LP-QE--Tools/refs/heads/main/libs/bash/ci-operator/interop/common/ExitTrap--PostProcessPrep.sh + )"; trap ' + LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \ + ExitTrap--PostProcessPrep junit--quay-tests__deploy-quay-aws-s3__quay-tests-deploy-quay-aws-s3.xml + ' EXIT +fi + function archive_pod_info() { local ns="quay-enterprise" echo "Archiving pod status and logs from namespace ${ns}..." diff --git a/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-ref.yaml b/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-ref.yaml index ac3925c122fc4..4669a5e11520c 100644 --- a/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-ref.yaml +++ b/ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-ref.yaml @@ -7,6 +7,7 @@ ref: tag: latest commands: quay-tests-deploy-quay-aws-s3-commands.sh timeout: 8h0m0s + grace_period: 10m resources: requests: cpu: 10m @@ -21,6 +22,12 @@ ref: documentation: |- Deploy Quay Operator and Quay env: + - name: DR__RP__CR_COMP_NAME + default: "lp-ocp-compat--Quay" + documentation: ReportPortal Component Readiness component name for junit remapping + - name: MAP_TESTS + default: "false" + documentation: Specify whether to update the test suite name for reporting tools - name: QUAY_OPERATOR_CHANNEL documentation: The quay operator channel default: "stable-3.12" diff --git a/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-commands.sh b/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-commands.sh index 7070d9ac20d4d..cca4653ede33b 100644 --- a/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-commands.sh +++ b/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-commands.sh @@ -3,6 +3,18 @@ set -o nounset set -o pipefail +if [ "${MAP_TESTS}" = "true" ]; then + eval "$( + typeset -a _fURL=() + type -t wget 1>/dev/null && _fURL=(wget -qO-) || _fURL=(curl -fsSL) + "${_fURL[@]}" \ + https://raw.githubusercontent.com/RedHatQE/OpenShift-LP-QE--Tools/refs/heads/main/libs/bash/ci-operator/interop/common/ExitTrap--PostProcessPrep.sh + )"; trap ' + LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \ + ExitTrap--PostProcessPrep junit--quay-tests__qbo-qe-test__quay-tests-qbo-qe-test.xml + ' EXIT +fi + QBO_RC=0 ( diff --git a/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-ref.yaml b/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-ref.yaml index 56ae6250a6531..483d1ad7106d3 100644 --- a/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-ref.yaml +++ b/ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-ref.yaml @@ -15,6 +15,12 @@ ref: documentation: |- Execute QBO QE testing env: + - name: DR__RP__CR_COMP_NAME + default: "lp-ocp-compat--Quay" + documentation: ReportPortal Component Readiness component name for junit remapping + - name: MAP_TESTS + default: "false" + documentation: Specify whether to update the test suite name for reporting tools - name: QBO_CHANNEL documentation: The quay bridge operator channel default: "stable-3.8" diff --git a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh index 32633b9ab8362..1452313c18ce9 100644 --- a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh +++ b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh @@ -2,6 +2,38 @@ set -euo pipefail +#Create Artifact Directory +ARTIFACT_DIR=${ARTIFACT_DIR:=/tmp/artifacts} +mkdir -p $ARTIFACT_DIR + +function copyArtifacts { + typeset junitPrefix="junit_" + cp -r ./cypress/results/* "$ARTIFACT_DIR" || true + + for file in "$ARTIFACT_DIR"/*; do + if [[ ! "$(basename "$file")" =~ ^"$junitPrefix" ]]; then + result_file="$ARTIFACT_DIR"/"$junitPrefix""$(basename "$file")" + mv "$file" "$result_file" + fi + done + cp -r ./cypress/videos/* "$ARTIFACT_DIR" || true +} + +if [ "${MAP_TESTS}" = "true" ]; then + eval "$( + typeset -a _fURL=() + type -t wget 1>/dev/null && _fURL=(wget -qO-) || _fURL=(curl -fsSL) + "${_fURL[@]}" \ +https://raw.githubusercontent.com/RedHatQE/OpenShift-LP-QE--Tools/refs/heads/main/libs/bash/ci-operator/interop/common/ExitTrap--PostProcessPrep.sh + )"; trap ' + copyArtifacts + LP_IO__ET_PPP__NEW_TS_NAME="${DR__RP__CR_COMP_NAME}--%s" \ + ExitTrap--PostProcessPrep junit--quay-tests__test-quay-e2e__quay-tests-test-quay-e2e.xml + ' EXIT +else + trap copyArtifacts EXIT +fi + #Set Kubeconfig: echo "Quay version is ${QUAY_VERSION}" QUAY_VERSION_THRESHOLD="3.16" @@ -19,78 +51,9 @@ oc version terraform version (cp -L $KUBECONFIG /tmp/kubeconfig || true) && export KUBECONFIG_PATH=/tmp/kubeconfig -#Create Artifact Directory: -ARTIFACT_DIR=${ARTIFACT_DIR:=/tmp/artifacts} -mkdir -p $ARTIFACT_DIR -original_results="${ARTIFACT_DIR}/original_results/" -mkdir "${original_results}" || true - -function install_yq() { - # Install yq manually if not found in image - echo "Installing yq" - mkdir -p /tmp/bin - export PATH=$PATH:/tmp/bin/ - curl -L "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_$(uname -m | sed 's/aarch64/arm64/;s/x86_64/amd64/')" \ - -o /tmp/bin/yq && chmod +x /tmp/bin/yq - - # Verify installation - cmd_yq="$(/tmp/bin/yq --version 2>/dev/null || true)" - if [ -n "$cmd_yq" ]; then - echo "yq version: $cmd_yq" - else - # Skip test mapping since yq isn't available - export MAP_TESTS="false" - fi -} - -function mapTestsForComponentReadiness() { - if [[ $MAP_TESTS == "true" ]]; then - results_file="${1}" - echo "Patching Tests Result File: ${results_file}" - if [ -f "${results_file}" ]; then - echo "Mapping Test Suite Name To: Quay-lp-interop" - /tmp/bin/yq eval -px -ox -iI0 '.testsuites.testsuite[]."+@name"="Quay-lp-interop"' $results_file || echo "Warning: yq failed for ${results_file}, debug manually" >&2 - fi - fi -} - - -function copyArtifacts { - JUNIT_PREFIX="junit_" - cp -r ./cypress/results/* $ARTIFACT_DIR - - if [[ $MAP_TESTS == "true" ]]; then - # If needed, install yq before loop - install_yq - fi - - for file in "$ARTIFACT_DIR"/*; do - if [[ ! "$(basename "$file")" =~ ^"$JUNIT_PREFIX" ]]; then - result_file="$ARTIFACT_DIR"/"$JUNIT_PREFIX""$(basename "$file")" - mv "$file" $result_file - - if [[ $MAP_TESTS == "true" ]]; then - echo "Collecting original results in ${original_results}" - # Keep a copy of all the original Junit files before modifying them - cp -r $result_file "${original_results}" || echo "Warning: couldn't copy original file ${results_file}" >&2 - - # Map tests if needed for related use cases - mapTestsForComponentReadiness "${result_file}" - - # Send junit file to shared dir for Data Router Reporter step - cp -r $result_file $SHARED_DIR || echo "Warning: couldn't send result file to SHARED_DIR" >&2 - fi - fi - done - cp -r ./cypress/videos/* $ARTIFACT_DIR -} - # Install Dependcies defined in packages.json npm install || true -#Finally Copy the Junit Testing XML files and Screenshots to /tmp/artifacts -trap copyArtifacts EXIT - # Cypress Doc https://docs.cypress.io/guides/references/proxy-configuration if [ "${QUAY_PROXY}" = "true" ]; then HTTPS_PROXY=$(cat $SHARED_DIR/proxy_public_url) diff --git a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml index c60840d2e64b6..abf751fa3ed65 100644 --- a/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml +++ b/ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml @@ -21,6 +21,9 @@ ref: - name: QUAY_VERSION documentation: Quay version default: "3.16" + - name: DR__RP__CR_COMP_NAME + default: "lp-ocp-compat--Quay" + documentation: ReportPortal Component Readiness component name for junit remapping - name: MAP_TESTS default: "false" documentation: Specify whether to update the test suite name for reporting tools