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

automation: Use reusable workflows to avoid duplications #3593

Merged
merged 14 commits into from
Sep 1, 2022

Conversation

JorTurFer
Copy link
Member

@JorTurFer JorTurFer commented Aug 24, 2022

Signed-off-by: Jorge Turrado [email protected]

This PR introduces GitHub reusable workflows to reduce duplicated code. As GitHub doesn't support placing reusable workflows everywhere, I placed them in workflows folder (the only place where they can be inside the repo) with the prefix rw to distinguish them from regular workflows. If we want to move to another place, we can move them into a shared repo in the org (I don't like it)

The summary of the changes is:

  • e2e tests on main branch have been moved to a reusable workflow and replace it in main-build.yml and nightly-e2e.yml
  • ARM64 smoke tests on main branch have been moved to a reusable workflow and replace it in main-build.yml and nightly-e2e.yml
  • trivy scan has been moved to a reusable workflow and replace it in main-build.yml, nightly-e2e.yml and pr-validation.yml
  • Smoke tests are executed on ubuntu-latest and every supported k8s version.

Checklist

Fixes #2569

@JorTurFer JorTurFer changed the title WIP - chore: Use reusable workflows to avoid duplications WIP - automation: Use reusable workflows to avoid duplications Aug 24, 2022
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
@JorTurFer JorTurFer force-pushed the reusable-workflows branch 8 times, most recently from d17dcdd to 9085ddb Compare August 24, 2022 14:51
Signed-off-by: Jorge Turrado <[email protected]>
@JorTurFer JorTurFer force-pushed the reusable-workflows branch 2 times, most recently from 074cb63 to 2b58a37 Compare August 24, 2022 15:02
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
@JorTurFer JorTurFer changed the title WIP - automation: Use reusable workflows to avoid duplications automation: Use reusable workflows to avoid duplications Aug 24, 2022
@JorTurFer JorTurFer marked this pull request as ready for review August 24, 2022 15:45
@JorTurFer JorTurFer requested a review from a team as a code owner August 24, 2022 15:45
@JorTurFer
Copy link
Member Author

Important @kedacore/keda-core-contributors , DON'T MERGE this PR, I have to modify this line https://github.com/kedacore/keda/pull/3593/files#diff-04af3c9c96028eebf4fa93d5c67e1fa08255fb7a3682f912ccd5bea1dff5ccd4R213 to point main instead of reusable-workflows branch (GH magic...)
I have kept reusalbe-workflows to be able to run every CI check on PR but before merging I need to change it or next PRs will fail on it

Signed-off-by: Jorge Turrado <[email protected]>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Great stuff!

@JorTurFer
Copy link
Member Author

kind team will do a release soon, so I'll wait to include the node v1.25 too

Copy link
Member

@tomkerkhove tomkerkhove left a comment

Choose a reason for hiding this comment

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

LGTM, great work! 🥰

.github/workflows/rw-versions-smoke-tests.yml Outdated Show resolved Hide resolved
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
@JorTurFer
Copy link
Member Author

I need to merge this PR because it's blocking me for other things, once kind releases the new node we can add it in another PR

@JorTurFer JorTurFer merged commit 098a966 into main Sep 1, 2022
@JorTurFer JorTurFer deleted the reusable-workflows branch September 1, 2022 15:52
andyatwork pushed a commit to andyatwork/keda that referenced this pull request Oct 31, 2022
* move smoke test to resuable workflows for ARM and multi versions

Signed-off-by: Jorge Turrado <[email protected]>

* fix styles

Signed-off-by: Jorge Turrado <[email protected]>

* add needed permission to script

Signed-off-by: Jorge Turrado <[email protected]>

* dummy

Signed-off-by: Jorge Turrado <[email protected]>

* undo dummy changes

Signed-off-by: Jorge Turrado <[email protected]>

* add rw to trivy

Signed-off-by: Jorge Turrado <[email protected]>

* use main for rw

Signed-off-by: Jorge Turrado <[email protected]>

* add rw for e2e test on main

Signed-off-by: Jorge Turrado <[email protected]>

* undo dummy change

Signed-off-by: Jorge Turrado <[email protected]>

* use current branch on PR

Signed-off-by: Jorge Turrado <[email protected]>

* update changelog

Signed-off-by: Jorge Turrado <[email protected]>

* remove whitespace

Signed-off-by: Jorge Turrado <[email protected]>

* rename templates

Signed-off-by: Jorge Turrado <[email protected]>

* Update trivy to set severity

Signed-off-by: Jorge Turrado <[email protected]>

Signed-off-by: Jorge Turrado <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use re-usable workflows for GitHub Actions
3 participants