QE OCP 4.17 Testing #142
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: QE OCP 4.17 Testing | |
on: | |
# pull_request: | |
# branches: [ main ] | |
workflow_dispatch: | |
# Schedule a daily cron at midnight UTC | |
schedule: | |
- cron: '0 0 * * *' | |
permissions: | |
contents: read | |
env: | |
QE_REPO: redhat-best-practices-for-k8s/certsuite-qe | |
jobs: | |
pull-unstable-image: | |
runs-on: qe-ocp-417 | |
env: | |
SHELL: /bin/bash | |
FORCE_DOWNLOAD_UNSTABLE: true | |
steps: | |
- name: Check out code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.sha }} | |
- name: Clone the QE repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: ${{ env.QE_REPO }} | |
path: certsuite-qe | |
- name: Run the script to pull the unstable image | |
run: ./scripts/download-unstable.sh | |
working-directory: certsuite-qe | |
qe-ocp-417-testing: | |
runs-on: qe-ocp-417 | |
needs: pull-unstable-image | |
if: needs.pull-unstable-image.result == 'success' | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [accesscontrol, affiliatedcertification, manageability, networking, lifecycle, performance, platformalteration, observability, operator] | |
env: | |
SHELL: /bin/bash | |
KUBECONFIG: '/home/labuser4/.kube/config' | |
PFLT_DOCKERCONFIG: '/home/labuser4/.docker/config' | |
CERTSUITE_IMAGE_NAME: quay.io/redhat-best-practices-for-k8s/certsuite | |
TEST_CERTSUITE_IMAGE_TAG: unstable | |
DOCKER_CONFIG_DIR: '/home/labuser4/.docker' | |
CERTSUITE_CONFIG_DIR: '/home/labuser4/certsuite_config' | |
CERTSUITE_REPORT_DIR: '/home/labuser4/tnf_report' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.sha }} | |
- name: Run initial setup | |
uses: ./.github/actions/setup | |
- name: Show pods | |
run: oc get pods -A | |
- name: Clone the QE repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: ${{ env.QE_REPO }} | |
path: certsuite-qe | |
- name: Preemptively potential QE namespaces | |
run: ./scripts/delete-namespaces.sh | |
working-directory: certsuite-qe | |
- name: Preemptively delete contents of openshift-marketplace namespace | |
run: ./scripts/clean-marketplace.sh | |
working-directory: certsuite-qe | |
- name: Preemptively delete report and config folders | |
shell: bash | |
run: | | |
sudo rm -rf ${{env.CERTSUITE_CONFIG_DIR}} | |
sudo rm -rf ${{env.CERTSUITE_REPORT_DIR}} | |
- name: Run the tests (against image) | |
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | |
with: | |
timeout_minutes: 60 | |
max_attempts: 3 | |
command: cd ${GITHUB_WORKSPACE}/certsuite-qe; FEATURES=${{matrix.suite}} CERTSUITE_REPO_PATH=${GITHUB_WORKSPACE} CERTSUITE_IMAGE=${{env.CERTSUITE_IMAGE_NAME}} CERTSUITE_IMAGE_TAG=${{env.TEST_CERTSUITE_IMAGE_TAG}} JOB_ID=${{github.run_id}} DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true make test-features | |
- name: Build the binary | |
run: make build-certsuite-tool | |
- name: Run the tests (against binary) | |
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | |
with: | |
timeout_minutes: 60 | |
max_attempts: 3 | |
command: cd ${GITHUB_WORKSPACE}/certsuite-qe; FEATURES=${{matrix.suite}} CERTSUITE_REPO_PATH=${GITHUB_WORKSPACE} USE_BINARY=true JOB_ID=${{github.run_id}} DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true make test-features | |
- name: Cleanup self-hosted runner images | |
run: docker image prune -f | |
- name: (if on main and upstream) Send chat msg to dev team if failed to run QE tests | |
if: ${{ failure() && github.ref == 'refs/heads/main' && github.repository_owner == 'redhat-best-practices-for-k8s' }} | |
env: | |
COMMIT_SHA: ${{ github.sha }} | |
JOB_RUN_ID: ${{ github.run_id }} | |
JOB_RUN_ATTEMPT: ${{ github.run_attempt }} | |
GITHUB_REPO: https://github.com/redhat-best-practices-for-k8s/certsuite | |
run: | | |
curl -X POST --data "{ | |
\"text\": \"🚨⚠️ Failed to run non-intrusive OCP 4.17 QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" | |
}" -H 'Content-type: application/json; charset=UTF-8' '${{ secrets.QE_NIGHTLY_WEBHOOK }}' |