Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init for backend switching action #388

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/e2e-k8s.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: e2e-on-k8s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just e2e?

Copy link
Member Author

@mfaizanse mfaizanse Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have another workflow e2e-without-lifecycle-manager, which should be renamed to e2e IMO. Thats why I added the k8s to convey the msg that this workflow uses real k8s on gardener.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is e2e-without-lifecycle-manager also running on gardener?

Copy link
Contributor

@marcobebway marcobebway Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we use the following prefixes when it make sense e2e-k3d e2e-gardener?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do it in next PR.


env:
KYMA_STABILITY: "unstable"
KYMA: "./hack/kyma"
MANAGER_IMAGE: europe-docker.pkg.dev/kyma-project/dev/eventing-manager:PR-${{ github.event.number }}

on:
pull_request_target:
branches:
- main
- "release-*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this understandable by gh-workflows? because it is not a valid regex.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from the other workflow. But I am sure atm, I will confirm this.

paths-ignore:
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"

jobs:
backend-switching:
runs-on: ubuntu-latest
needs: wait-until-build-succeeds

steps:
- uses: actions/checkout@v4

- name: Cache Binaries
id: cache-binaries
uses: actions/cache@v3
with:
path: bin
key: ${{ runner.os }}-bin

- name: Install Kyma CLI
run: |
echo ${TUNAS_TEST_1} > hello.txt
cat hello.txt
44 changes: 18 additions & 26 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,25 @@ on:
- "sec-scanners-config.yaml"

jobs:
wait-until-build-succeeds:
runs-on: ubuntu-latest
steps:
- name: Wait for the 'pull-eventing-manager-build' job to succeed
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"

nats:
runs-on: ubuntu-latest
needs: wait-until-build-succeeds

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -45,19 +62,6 @@ jobs:
run: |
make install IMG=$MANAGER_IMAGE

- name: Wait for the 'pull-eventing-manager-build' job to succeed
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"

- name: Deploy the controller to the cluster
run: |
kubectl create ns kyma-system || true
Expand Down Expand Up @@ -95,6 +99,7 @@ jobs:

PeerAuthentication:
runs-on: ubuntu-latest
needs: wait-until-build-succeeds

steps:
- uses: actions/checkout@v4
Expand All @@ -118,19 +123,6 @@ jobs:
run: |
make install IMG=$MANAGER_IMAGE

- name: Wait for the 'pull-eventing-manager-build' job to succeed
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"

- name: Deploy the controller to the cluster
run: |
kubectl create ns kyma-system || true
Expand Down