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

chore: Introduce shared GitHub Actions #1451

Merged
merged 57 commits into from
Apr 12, 2024

Conversation

c-pius
Copy link
Contributor

@c-pius c-pius commented Apr 5, 2024

Description

Changes proposed in this pull request:

  • splits the E2E Test workflow into single actions that can be composed and re-used between our repositories
  • adds some improvements, see the inline comments

Related issue(s)

Comments

To ease the review allowing to compare the new workflow runs against the old ones, the old test-e2e.yaml workflow is still there unchanged and the new workflow is in test-e2e-junk.yaml. Once the changes are good to go, the old file will be updated with the new workflow and the separate junk file will be deleted.

When reviewing, it is probably best to start from test-e2e-junk.yaml and from there look into the used helper actions.

Once this PR is merged, we can re-use the actions in watcher. Right now it is not possible because policies restrict using actions from forked repositories.

@c-pius c-pius requested a review from a team as a code owner April 5, 2024 11:54
@kyma-bot kyma-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 5, 2024
@c-pius c-pius force-pushed the chore/shared-github-actions branch 8 times, most recently from c91db95 to c5c2559 Compare April 8, 2024 14:32
@kyma-bot kyma-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 8, 2024
@c-pius c-pius force-pushed the chore/shared-github-actions branch 12 times, most recently from 22b0dd2 to ef4b6e6 Compare April 9, 2024 14:27
@kyma-bot kyma-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 9, 2024
@c-pius c-pius force-pushed the chore/shared-github-actions branch from f405232 to e203069 Compare April 9, 2024 16:37
Comment on lines +24 to +38
steps:
- name: Define variables
id: define-variables
shell: bash
run: |
echo "k8s_version=${{ github.event.inputs.k8s_version || '1.28.7' }}" >> $GITHUB_OUTPUT
echo "istio_version=1.20.3" >> $GITHUB_OUTPUT
echo "k3d_version=5.6.0" >> $GITHUB_OUTPUT
echo "cert_manager_version=1.13.3" >> $GITHUB_OUTPUT
echo "klm_version_tag=PR-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
echo "klm_image_repo=dev" >> $GITHUB_OUTPUT
- name: Expose environment variables
shell: bash
run: |
echo "GOSUMDB=off" >> $GITHUB_ENV
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment: I opted to have everything just needed in the test setup as "regular" vars, and to only export those things as env vars which are needed downstream by the tests.

Comment on lines +33 to +34
echo "klm_version_tag=PR-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
echo "klm_image_repo=dev" >> $GITHUB_OUTPUT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment: these here used to be a conditional based on whether the job is running for a main build or a PR build. Since we removed the post main build, I removed this conditional now.

.github/workflows/test-e2e-junk.yaml Outdated Show resolved Hide resolved
@c-pius c-pius removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2024
@c-pius c-pius requested a review from jeremyharisch April 10, 2024 15:57
@kyma-bot kyma-bot added the lgtm Looks good to me! label Apr 12, 2024
@kyma-bot kyma-bot merged commit ba89fe8 into kyma-project:main Apr 12, 2024
42 checks passed
@c-pius c-pius deleted the chore/shared-github-actions branch April 16, 2024 05:41
@c-pius c-pius added the area/quality Related to all activites around quality label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Related to all activites around quality cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2E config improvement
4 participants