From 7e7f2897e8b06883e67f7549b74f96a3f5f6cf14 Mon Sep 17 00:00:00 2001 From: Kamil Kasperski Date: Tue, 10 Sep 2024 15:27:57 +0200 Subject: [PATCH] chore: switch main build jobs /kind chore /area api-gateway Remove wait-for-build usage from main-integration.yaml and build directly. --- .github/workflows/main-integration.yaml | 44 ++++++++++------------- .github/workflows/verify-commit-pins.yaml | 1 + 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main-integration.yaml b/.github/workflows/main-integration.yaml index ab1e826a8..aeae8f33b 100644 --- a/.github/workflows/main-integration.yaml +++ b/.github/workflows/main-integration.yaml @@ -3,6 +3,10 @@ name: Main Integration +permissions: + id-token: write # This is required for requesting the JWT token + contents: read # This is required for actions/checkout + on: push: paths-ignore: @@ -17,33 +21,21 @@ on: - cron: '0 5 * * *' # Run every day at 05:00 AM jobs: - wait-for-image-build: - name: Wait for image build - runs-on: ubuntu-latest - outputs: - sha: ${{ steps.get-sha.outputs.sha }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: ./.github/actions/wait-for-job-succeed-or-fail - if: ${{ github.event_name != 'schedule' }} - with: - job-name: 'post-api-gateway-manager-build' - github-auth-token: ${{ secrets.GITHUB_TOKEN }} - commit-ref: ${{ github.sha }} - - id: get-sha - run: | - if [ "${{ github.event_name }}" != "schedule" ]; then - echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT - else - echo "sha=$(./scripts/get_latest_build_sha.sh)" >> $GITHUB_OUTPUT - fi + build: + name: build api-gateway image + uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main + with: + name: api-gateway + dockerfile: Dockerfile + context: . + build-args: | + VERSION=${{ github.sha }} + tags: "${{ github.sha }}" integration-tests: name: Integration tests runs-on: ubuntu-latest - needs: [wait-for-image-build] + needs: [build] steps: - uses: actions/checkout@v4 with: @@ -58,7 +50,7 @@ jobs: upgrade-tests: name: Upgrade tests runs-on: ubuntu-latest - needs: [wait-for-image-build] + needs: [build] steps: - uses: actions/checkout@v4 with: @@ -74,7 +66,7 @@ jobs: custom-domain-integration-gcp: name: Custom domain integration GCP runs-on: ubuntu-latest - needs: [wait-for-image-build] + needs: [build] steps: - uses: actions/checkout@v4 with: @@ -93,7 +85,7 @@ jobs: custom-domain-integration-aws: name: Custom domain integration AWS runs-on: ubuntu-latest - needs: [wait-for-image-build] + needs: [build] steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/verify-commit-pins.yaml b/.github/workflows/verify-commit-pins.yaml index 091db861e..3b74ead25 100644 --- a/.github/workflows/verify-commit-pins.yaml +++ b/.github/workflows/verify-commit-pins.yaml @@ -20,3 +20,4 @@ jobs: actions/checkout actions/setup-go actions/upload-artifact + kyma-project/test-infra \ No newline at end of file