Skip to content

Commit

Permalink
Fix broken main scheduled tests (#1056)
Browse files Browse the repository at this point in the history
* Replace unreliable job to get SHA with building image

* Update docs
  • Loading branch information
triffer authored Oct 7, 2024
1 parent 481090f commit 5621033
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 62 deletions.
33 changes: 0 additions & 33 deletions .github/actions/get-latest-sha/action.yaml

This file was deleted.

25 changes: 12 additions & 13 deletions .github/workflows/performance-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ on:
schedule:
- cron: '0 5 * * *' # Run every day at 05:00 AM
jobs:
get-sha:
name: Get manager SHA
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.get-sha.outputs.sha }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: get-sha
uses: ./.github/actions/get-latest-sha
build-image:
name: Build manager image
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: istio-manager
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.ref_name }}
tags: "${{ github.sha }}"

istio-performance-test:
name: Istio performance test
runs-on: ubuntu-latest
needs: [ get-sha ]
needs: [ build-image ]
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
Expand All @@ -35,7 +34,7 @@ jobs:
with:
go-version-file: "go.mod"
- run: |
make IMG="europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{ needs.get-sha.outputs.sha }}" gardener-perf-test
make IMG="europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{ github.sha }}" gardener-perf-test
shell: bash
env:
GARDENER_KUBECONFIG: "/home/runner/work/istio/istio/gardener_kubeconfig.yaml"
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/ui-tests-periodic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ on:
- cron: '0 5 * * 1' #run on schedule every Monday 5:00 AM

jobs:
get-sha:
name: Get manager SHA
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.get-sha.outputs.sha }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: get-sha
uses: ./.github/actions/get-latest-sha
build-image:
name: Build manager image
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: istio-manager
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.ref_name }}
tags: "${{ github.sha }}"

run-ui-tests-periodic:
name: Run UI tests
runs-on: ubuntu-latest
needs: [ get-sha ]
needs: [ build-image ]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,8 +31,8 @@ jobs:
run: |
sudo echo "127.0.0.1 local.kyma.dev" | sudo tee -a /etc/hosts
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | sudo bash
docker pull europe-docker.pkg.dev/kyma-project/prod/istio-manager:"${{ needs.get-sha.outputs.sha }}"
IMG=europe-docker.pkg.dev/kyma-project/prod/istio-manager:"${{ needs.get-sha.outputs.sha }}" ./tests/ui/scripts/k3d-ci-kyma-dashboard-integration.sh stage
docker pull europe-docker.pkg.dev/kyma-project/prod/istio-manager:"${{github.sha}}"
IMG=europe-docker.pkg.dev/kyma-project/prod/istio-manager:"${{github.sha}}" ./tests/ui/scripts/k3d-ci-kyma-dashboard-integration.sh stage
- uses: actions/upload-artifact@v4
if: always()
name: Export Cypress output
Expand Down
4 changes: 2 additions & 2 deletions docs/contributor/04-30-ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ The following CI jobs are scheduled to run at specific times.

| Name | Description |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| [`main performance tests / Get manager SHA`](https://github.com/kyma-project/istio/blob/e0f785da2a127732697a5ff7385740ef8c6f7951/.github/workflows/performance-test.yaml#L12) | Extracts the SHA of the commit that triggered the last successful build of the Istio manager image on main. |
| [`main performance tests / Build manager image`]() | Builds Kyma Istio Operator's image and pushes it to the `prod` registry. |
| [`main performance tests / Istio performance test`](https://github.com/kyma-project/istio/blob/fd34803dd516c3b614fda4f5b9d9a4c8b46372bb/.github/workflows/performance-test.yaml#L10) | Runs Istio Manager's performance tests every day at 12:00 AM on a Gardener GCP cluster. |
| [`UI Tests Periodic / Get manager SHA`](https://github.com/kyma-project/istio/blob/e0f785da2a127732697a5ff7385740ef8c6f7951/.github/workflows/ui-tests-periodic.yaml#L11) | Extracts the SHA of the commit that triggered the last successful build of the Istio manager image on main. |
| [`UI Tests Periodic / Build manager image`]() | Builds Kyma Istio Operator's image and pushes it to the `prod` registry. |
| [`UI Tests Periodic / Run UI tests`](https://github.com/kyma-project/istio/blob/65822779cbf899909088820ab009450e579199f8/.github/workflows/ui-tests-periodic.yaml#L8) | Runs UI tests for Busola extensions of Istio Module. |
| [`UI Tests Periodic / Slack Notification`](https://github.com/kyma-project/istio/blob/65822779cbf899909088820ab009450e579199f8/.github/workflows/ui-tests-periodic.yaml#L32) | Sends a Slack notification to the team's channel if any pipelines fail in the workflow. |

0 comments on commit 5621033

Please sign in to comment.