Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mfaizanse committed Sep 18, 2024
1 parent 3c318b5 commit 249ba60
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 38 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/e2e-upgrade-test-reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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: |
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/pull-e2e-upgrade-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 5 additions & 15 deletions .github/workflows/pull-target-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/push-e2e-upgrade-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 249ba60

Please sign in to comment.