diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 75b8e136..509a7243 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -205,9 +205,6 @@ jobs: git tag $VERSION git push origin $VERSION - - name: Wait for job 'release-eventing-manager-build' to succeed - run: ./hack/ci/wait-for-release-build-job.sh ${{ github.ref_name }} 600 10 30 # Inputs: repo (format: "owner/repo"), timeout, interval and initial wait time. - - name: Create and upload eventing-manager.yaml and eventing-default-cr.yaml env: PULL_BASE_REF: ${{ needs.generate-version.outputs.VERSION }} @@ -218,11 +215,20 @@ jobs: run: | ./hack/ci/render_and_upload_manifests.sh + wait-until-build-succeeds: + needs: [generate-version, create-draft] + uses: "kyma-project/eventing-tools/.github/workflows/wait-build-reusable.yml@main" + with: + repository: ${{ github.repository_owner }}/eventing-manager + git_ref: ${{ needs.generate-version.outputs.VERSION }} + git_check_run_name: "build-${{ needs.generate-version.outputs.VERSION }} / Build image" + bump-sec-scanners-config-main: name: Bump sec-scanners-config.yaml on main branch needs: - create-draft - generate-version + - wait-until-build-succeeds runs-on: ubuntu-latest env: VERSION: ${{ needs.generate-version.outputs.VERSION }} diff --git a/.github/workflows/e2e-upgrade-test-reusable.yaml b/.github/workflows/e2e-upgrade-test-reusable.yaml index 2bdf4bbe..f380ef99 100644 --- a/.github/workflows/e2e-upgrade-test-reusable.yaml +++ b/.github/workflows/e2e-upgrade-test-reusable.yaml @@ -18,9 +18,6 @@ on: required: true type: string description: "The image tag of the Eventing Manager after the upgrade" - build-job-name: - type: string - description: "The name of the build job to wait for" commit-sha: type: string description: "The commit sha of the new version" @@ -88,20 +85,6 @@ jobs: make e2e-setup make e2e-eventing-setup - - name: Wait for the ${{ inputs.build-job-name }} job to succeed - if: ${{ inputs.build-job-name != '' }} - uses: kyma-project/wait-for-commit-status-action@2b3ffe09af8b6f40e1213d5fb7f91a7bd41ffb20 - with: - context: ${{ inputs.build-job-name }} - commit_ref: "${{ inputs.commit-sha }}" - timeout: 600000 # 10 minutes in milliseconds - # The check interval is kept long otherwise it will exhaust the GitHub rate limit (More info: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting) - check_interval: 60000 # 1 minute in milliseconds - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - GITHUB_OWNER: "${{ github.repository_owner }}" - GITHUB_REPO: "eventing-manager" - - name: Upgrade Eventing manager id: upgrade-eventing-manager run: | diff --git a/.github/workflows/pull-e2e-upgrade-test.yaml b/.github/workflows/pull-e2e-upgrade-test.yaml index 686f73bf..5aacfe1a 100644 --- a/.github/workflows/pull-e2e-upgrade-test.yaml +++ b/.github/workflows/pull-e2e-upgrade-test.yaml @@ -15,11 +15,19 @@ on: - PROJECT jobs: + wait-until-build-succeeds: + needs: is-pr-approved + uses: "kyma-project/eventing-tools/.github/workflows/wait-build-reusable.yml@main" + with: + repository: ${{ github.repository_owner }}/eventing-manager + git_ref: ${{ github.event.pull_request.head.sha }} + git_check_run_name: "build / Build image" + upgrade-test: + needs: wait-until-build-succeeds uses: ./.github/workflows/e2e-upgrade-test-reusable.yaml with: pre-upgrade-image-tag: main post-upgrade-image-tag: PR-${{ github.event.number }} - build-job-name: pull-eventing-manager-build commit-sha: ${{ github.event.pull_request.head.sha }} secrets: inherit diff --git a/.github/workflows/pull-target-e2e.yml b/.github/workflows/pull-target-e2e.yml index 90d4a375..8759600c 100644 --- a/.github/workflows/pull-target-e2e.yml +++ b/.github/workflows/pull-target-e2e.yml @@ -34,22 +34,12 @@ jobs: ./scripts/is_pr_approved.sh wait-until-build-succeeds: - runs-on: ubuntu-latest needs: is-pr-approved - steps: - - name: Wait for the 'pull-eventing-manager-build' job to succeed - id: pull-wait-build - uses: kyma-project/wait-for-commit-status-action@2b3ffe09af8b6f40e1213d5fb7f91a7bd41ffb20 - with: - context: "pull-eventing-manager-build" - commit_ref: "${{ github.event.pull_request.head.sha }}" # Note: 'github.event.pull_request.head.sha' is not same as 'github.sha' on pull requests. - timeout: 600000 # 10 minutes in milliseconds - # The check interval is kept long otherwise it will exhaust the GitHub rate limit (More info: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting) - check_interval: 60000 # 1 minute in milliseconds - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - GITHUB_OWNER: "${{ github.repository_owner }}" - GITHUB_REPO: "eventing-manager" + uses: "kyma-project/eventing-tools/.github/workflows/wait-build-reusable.yml@main" + with: + repository: ${{ github.repository_owner }}/eventing-manager + git_ref: ${{ github.event.pull_request.head.sha }} + git_check_run_name: "build / Build image" backend-switching: needs: wait-until-build-succeeds diff --git a/.github/workflows/push-e2e-upgrade-test.yaml b/.github/workflows/push-e2e-upgrade-test.yaml index 58fa7b65..d73682fc 100644 --- a/.github/workflows/push-e2e-upgrade-test.yaml +++ b/.github/workflows/push-e2e-upgrade-test.yaml @@ -28,12 +28,19 @@ jobs: run: | echo "latest_release_tag=$(curl -s https://api.github.com/repos/kyma-project/eventing-manager/releases/latest | jq -r '.tag_name')" >> "$GITHUB_OUTPUT" + wait-until-build-succeeds: + needs: export-info + uses: "kyma-project/eventing-tools/.github/workflows/wait-build-reusable.yml@main" + with: + repository: ${{ github.repository_owner }}/eventing-manager + git_ref: ${{ github.sha }} + git_check_run_name: "build / Build image" + upgrade-test: uses: ./.github/workflows/e2e-upgrade-test-reusable.yaml - needs: get-latest-release + needs: [get-latest-release, wait-until-build-succeeds] with: pre-upgrade-image-tag: ${{ needs.get-latest-release.outputs.latest_release_tag }} post-upgrade-image-tag: main - build-job-name: post-eventing-manager-build commit-sha: ${{ github.sha }} secrets: inherit