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

Trigger GHA release workflow on tags following test-* pattern #5619

Merged
merged 4 commits into from
Nov 11, 2022

Conversation

beni0888
Copy link
Collaborator

@beni0888 beni0888 commented Nov 8, 2022

Signed-off-by: Jesús Benito Calzada bjesus@vmware.com

Description of the change

We need a way of being able to test the new release workflow in GHA. So far, it's only triggered on new tags following the pattern v[0-9]+.[0-9]+.[0-9]+, so we cannot trigger it unless a new release tag is created. To allow testing without generating new release tags, we have added a new condition that triggers the workflow when new tags following the pattern tests-* are created.

Benefits

The release workflow can be triggered and tested without the need of creating new release tags.

Possible drawbacks

If we don't control the kind of tag that triggered the workflow, and deactivate the DEV_MODE for the kubeapps-main workflow, we could generate an actual release on the Bitnami side upon the creation of new test-* tags.

Applicable issues

Additional information

N/A

@netlify
Copy link

netlify bot commented Nov 8, 2022

Deploy Preview for kubeapps-dev canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 31fc8b3
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/636e232ed47f900009065ac2

@beni0888 beni0888 self-assigned this Nov 8, 2022
@beni0888 beni0888 added component/ci Issue related to kubeapps ci system github_actions Pull requests that update GitHub Actions code labels Nov 8, 2022
@beni0888 beni0888 added this to the Migrate CI to GitHub Actions milestone Nov 8, 2022
@beni0888 beni0888 marked this pull request as ready for review November 8, 2022 15:30
Copy link
Contributor

@antgamdia antgamdia left a comment

Choose a reason for hiding this comment

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

Ok, it seems like a temporary thing we need to be able to test the CI step. +1 as I don't wanna block it when on PTO, but find below some comments and concerns:

  • Can't we just trigger the workflow (manually) from the github UI instead?
  • Creating a release when we should not seems to be a bit risky if we forget to add the DEV variable. What about using the github.ref variable to set the DEV variable if the tag contains test- or whatever?
  • The name test- perhaps is not the most accurate, anyway, it is a temporary thing, so doesn't really matter.
  • I'd add a comment # TODO(xxx): yyy saying it is a temporary thing that must be removed soon.

@beni0888
Copy link
Collaborator Author

beni0888 commented Nov 9, 2022

  • Can't we just trigger the workflow (manually) from the github UI instead?

That would be tricky and would imply a lot of changes...

  • Creating a release when we should not seems to be a bit risky if we forget to add the DEV variable. What about using the github.ref variable to set the DEV variable if the tag contains test- or whatever?

Let me think about it 🙂

  • The name test- perhaps is not the most accurate, anyway, it is a temporary thing, so doesn't really matter.
  • I'd add a comment # TODO(xxx): yyy saying it is a temporary thing that must be removed soon.

Yeah, it looks like a good idea

Jesús Benito Calzada added 2 commits November 10, 2022 11:24
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
@beni0888 beni0888 force-pushed the allow-test-gha-release branch from 962484a to d11edd4 Compare November 10, 2022 10:58
@beni0888
Copy link
Collaborator Author

  • Creating a release when we should not seems to be a bit risky if we forget to add the DEV variable. What about using the github.ref variable to set the DEV variable if the tag contains test- or whatever?

I've added the hack for this. Thanks @antgamdia!

Jesús Benito Calzada added 2 commits November 11, 2022 07:30
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
@beni0888 beni0888 merged commit afabf4b into vmware-tanzu:main Nov 11, 2022
@beni0888 beni0888 deleted the allow-test-gha-release branch November 11, 2022 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required component/ci Issue related to kubeapps ci system github_actions Pull requests that update GitHub Actions code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants