From 3cf604c5287e97a3316c21b8d57a68fc793bcedc Mon Sep 17 00:00:00 2001
From: Paul Abel
Date: Fri, 5 Jul 2024 10:31:22 +0100
Subject: [PATCH 1/2] test single image workflow
---
.github/workflows/single-image-regression.yml | 106 ++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 .github/workflows/single-image-regression.yml
diff --git a/.github/workflows/single-image-regression.yml b/.github/workflows/single-image-regression.yml
new file mode 100644
index 0000000000..ec00de88ca
--- /dev/null
+++ b/.github/workflows/single-image-regression.yml
@@ -0,0 +1,106 @@
+name: Run python tests on single image
+run-name: Testing ${{ inputs.image }}:${{ inputs.tag }} on ${{ inputs.k8s-version }} by @${{ github.actor }}
+
+on:
+ workflow_dispatch:
+ inputs:
+ image:
+ type: string
+ description: "Image to test"
+ required: true
+ tag:
+ type: string
+ description: "Image tag to test"
+ required: true
+ k8s-version:
+ type: string
+ description: "e.g. 1.30.0"
+ required: true
+ type:
+ type: string
+ description: "oss or plus"
+ required: false
+ default: oss
+ marker:
+ type: string
+ description: "pytest markers to apply"
+ required: false
+ default: "'not upgrade'"
+ test-image-tag:
+ type: string
+ description: "The tag for the test image"
+ required: false
+ default: latest
+ workflow_call:
+ inputs:
+ image:
+ type: string
+ description: "Image to test"
+ required: true
+ tag:
+ type: string
+ description: "Image tag to test"
+ required: true
+ k8s-version:
+ type: string
+ description: "e.g. 1.30.0"
+ required: true
+ type:
+ type: string
+ description: "oss or plus"
+ required: false
+ default: oss
+ marker:
+ type: string
+ description: "pytest markers to apply"
+ required: false
+ default: "'not upgrade'"
+
+defaults:
+ run:
+ shell: bash
+
+concurrency:
+ group: ${{ github.ref_name }}-single-run
+ cancel-in-progress: false
+
+permissions:
+ contents: read
+
+jobs:
+ checks:
+ name: Run regression
+ runs-on: ubuntu-22.04
+ permissions:
+ contents: read
+ id-token: write
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+
+ - name: Authenticate to Google Cloud
+ id: auth
+ uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
+ with:
+ token_format: access_token
+ workload_identity_provider: ${{ secrets.GCR_WORKLOAD_IDENTITY }}
+ service_account: ${{ secrets.GCR_SERVICE_ACCOUNT }}
+
+ - name: Login to GCR
+ uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
+ with:
+ registry: gcr.io
+ username: oauth2accesstoken
+ password: ${{ steps.auth.outputs.access_token }}
+
+ - name: Run Tests
+ uses: ./.github/actions/smoke-tests
+ with:
+ image-type: ${{ inputs.type }}
+ image-name: ${{ inputs.image }}
+ tag: ${{ inputs.tag }}
+ marker: ${{ inputs.marker }}
+ label: "${{ inputs.image }} regression"
+ k8s-version: ${{ inputs.k8s-version }}
+ azure-ad-secret: ${{ secrets.AZURE_AD_AUTOMATION }}
+ test-image: "gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/test-runner:${{ inputs.test-image-tag }}"
From aecfffde045a9864b722f26c3aa10b74dbcbfec7 Mon Sep 17 00:00:00 2001
From: Paul Abel
Date: Fri, 5 Jul 2024 10:33:34 +0100
Subject: [PATCH 2/2] add ci hash exclusion
---
.github/scripts/exclude_ci_files.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/scripts/exclude_ci_files.txt b/.github/scripts/exclude_ci_files.txt
index 447f58073e..6ffdd73936 100644
--- a/.github/scripts/exclude_ci_files.txt
+++ b/.github/scripts/exclude_ci_files.txt
@@ -39,6 +39,7 @@
.github/workflows/release.yml
.github/workflows/retag-images.yml
.github/workflows/scorecards.yml
+.github/workflows/single-image-regression.yml
.github/workflows/stale.yml
.github/workflows/update-docker-images.yml
.github/workflows/update-docker-sha.yml