diff --git a/.github/actions/get-latest-sha/action.yaml b/.github/actions/get-latest-sha/action.yaml deleted file mode 100644 index d432d0f00e..0000000000 --- a/.github/actions/get-latest-sha/action.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: 'Get latest Istio Manager SHA' -description: 'Get latest SHA of main build executed for Istio manager' -outputs: - sha: - description: 'SHA of the latest Istio Manager main build' - value: ${{ steps.get-sha.outputs.sha }} -runs: - using: "composite" - steps: - - name: Get SHA from latest run of main integration triggered by push - id: get-sha - uses: actions/github-script@v7 - with: - script: | - if (context.eventName !== 'schedule') { - core.setOutput('sha', context.sha); - return; - } - - const { data } = await github.rest.actions.listWorkflowRuns({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: 'main-integration.yaml', - branch: 'main', - status: 'success', - per_page: 40 - }); - const pushRuns = data.workflow_runs.filter(run => run.event === 'push'); - if (pushRuns.length === 0) { - throw new Error('No successful push runs found'); - } - const latestRun = pushRuns[0]; - core.setOutput('sha', latestRun.head_sha); diff --git a/.github/workflows/performance-test.yaml b/.github/workflows/performance-test.yaml index b94bc0cfa1..f3168a18b4 100644 --- a/.github/workflows/performance-test.yaml +++ b/.github/workflows/performance-test.yaml @@ -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 @@ -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" diff --git a/.github/workflows/ui-tests-periodic.yaml b/.github/workflows/ui-tests-periodic.yaml index adf73c59ac..6426ef6c08 100644 --- a/.github/workflows/ui-tests-periodic.yaml +++ b/.github/workflows/ui-tests-periodic.yaml @@ -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: @@ -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 diff --git a/docs/contributor/04-30-ci-cd.md b/docs/contributor/04-30-ci-cd.md index 4c7f0b8b79..163b3a429c 100644 --- a/docs/contributor/04-30-ci-cd.md +++ b/docs/contributor/04-30-ci-cd.md @@ -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. |