-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add github action to run e2e command "on-demand" #2241
Conversation
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Looking great so far, minor nit, I'd change the trigger command |
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
I think that I'm near of the solution :) |
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
…t steps) Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Another sample is this PR |
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really great!
Finally caught up on the idea and it's great 👍 I'd suggest renaming the command to |
We should also have a follow-up item to refactor our actions and reduce the duplication by using reusable workflows: https://docs.github.com/en/actions/learn-github-actions/reusing-workflows |
Honestly, I'd like to keep the command shorter than possible to reduce the possibility of errors. But maybe we can rename to
|
I think that now all the goals are achieved: The images used during the process are deleted after the e2e tests have finished. Please, take a look at the PR description, I updated it to add 2 important notes related with the requirements to do this usable |
@JorTurFer excellent! ad Note1: the image will be automatically build once we merge this PR ad Note2: @tomkerkhove might help? |
agree on making the command short, |
Let's make it very explicit and use dedicated images to fully isolate - Better safe than sorry. |
I don't understand that. I understand that the package itself it's protected but not all the versions. You could delete one version or whole package. |
💯 |
do you want to use other organization or only other package? # If E2E_IMAGE_TAG is defined, we are on pr e2e test and we have to use the new tag and append -test to the repository
ifeq '${E2E_IMAGE_TAG}' ''
VERSION = main
SUFFIX = ''
endif
ifneq '${E2E_IMAGE_TAG}' ''
VERSION = ${E2E_IMAGE_TAG}
SUFFIX = '-test'
endif
IMAGE_REGISTRY ?= ghcr.io
IMAGE_REPO ?= kedacore
IMAGE_CONTROLLER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda$(SUFFIX):$(VERSION)
IMAGE_ADAPTER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda-metrics-apiserver$(SUFFIX):$(VERSION) This change will append In this second case, we have to create at least 1 tag manual because it's not possible to keep the repository without any version (tag), you will get an error if you try it saying that you should delete the whole package. We can create an empty image manually and push to only to have one tag always. WDYT? |
@JorTurFer yeah, that would be probably the best approach. |
I'll try it and I hope this afternoon the PR will be ready :) |
@JorTurFer no worries, if you change the target images we can merge this PR and do the testing direclty in here. |
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
@zroubalik FYI |
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
could you create the *-test packages with one dummy tag? Have I got enough permissions to do that? |
@tomkerkhove could you please help here, I am afk |
Why is that? Can't you just push them through a test run? |
Yes, but we can't delete a tag if it's the only tag that keeps there, so I think that could be better if we create a dummy tag in order to be able to delete others |
Frankly, if it's a test image we don't have to delete the tags perse which allow us to reduce the scope of the PAT anyway. |
If we don't want to remove the test images, we don't need the PAT, for pushing proposes it's enough the GITHUB_TOKEN available in the runner |
Yes, that was what I was suggesting indeed - This feels better. |
For me it's totally enough. If it's another package, we could delete them manually from time to time if we want |
Ack, It's not my storage 😄 |
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
I've just deleted the steps of removing both images, I don't have any other change pending |
Let's wait until the build-tools image is being built. This is awesome @JorTurFer!!! I have been hoping to have something like this for more than a year :) |
Signed-off-by: jorturfer jorge_turrado@hotmail.es
We have been discussing how to run e2e test in PRs before merge them when anyone with writing permissions requests it.
There are several options to achieve this behavior, in this PR I propose to use several actions in a row to allow it.
When someone with writing permissions comment the PR with the message
/e2e
, automatically this action will be executed reacting the comment with 🚀 to refer that the pipeline is in process, and also with 👍 / 👎 to notify if the e2e tests have passed or not.Also, the trigger supports setting the e2e test discovery regex using if you want, using this format
/e2e REGEX
, ex:/run-e2e *.test.ts
/run-e2e cron*
Note: To use this feature, we should build and push this image
ghcr.io/kedacore/build-tools:main
because a few extra packages are needed like up-to-dated git, or hub prNote2: Because of this, a PAT with delete permissions in the packages should be added also in order to be able to drop the e2e-test-tag from ghcr. GITHUB_TOKEN is not enough. The expected secret name is
GHCR_AUTH_PAT
Achievements:
Checklist
Fixes #2224