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

Update automated workflow to allow for overriding orgs for dockerhub and quay #250

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

detiber
Copy link
Member

@detiber detiber commented Apr 5, 2022

Update automated workflow to allow for overriding orgs for dockerhub and quay

@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

/assign @displague

@deitch
Copy link
Contributor

deitch commented Apr 6, 2022

@detiber a few questions:

  • why do we have our own metadata action here? What does it do?
  • why move the org names into secrets?

@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

@detiber a few questions:

  • why do we have our own metadata action here? What does it do?

It allows to standardize a bit how we are creating the metadata and avoiding some copy-pasta type issues, since it needs to be run by multiple jobs.

  • why move the org names into secrets?

I'd rather not use a secret here TBH, but it's the only way that I could figure out how to override the value on a per-org basis, so that users can run/publish/test using their own quay/dockerhub/ghcr orgs for testing in their own forks.

Otherwise users would have to hack things up and override hardcoded values in the repo in order to override upstream quay/dockerhub orgs.

@deitch
Copy link
Contributor

deitch commented Apr 6, 2022

I'd rather not use a secret here TBH, but it's the only way that I could figure out how to override the value on a per-org basis, so that users can run/publish/test using their own quay/dockerhub/ghcr orgs for testing in their own forks

So if I want to test the CI by launching an action manually, but pushing to a different org (not affect the official distributed supported EQXM images), then I can change the secret? But how would I do that without being admin, and doesn't it then permanently change it, so now I need an admin to put it back?

Admittedly, testing for actions is kind of miserable.

@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

I'd rather not use a secret here TBH, but it's the only way that I could figure out how to override the value on a per-org basis, so that users can run/publish/test using their own quay/dockerhub/ghcr orgs for testing in their own forks

So if I want to test the CI by launching an action manually, but pushing to a different org (not affect the official distributed supported EQXM images), then I can change the secret? But how would I do that without being admin, and doesn't it then permanently change it, so now I need an admin to put it back?

Admittedly, testing for actions is kind of miserable.

So, basically, the secrets only exist for this repository. If a user wanted to test on their fork, they would define their own secrets there. Since their fork is under their personal account, they have admin permissions to add secrets there.

@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

As a more concrete example, when testing this in my fork, I configured DOCKER_ORG to detiber, and QUAY_ORG to detiber, and that allowed me to test everything against container repos that I owned.

@deitch
Copy link
Contributor

deitch commented Apr 6, 2022

Oh, I get it. So you can test on your own fork, then open the PR when the action looks good.

There seriously has to be a better way to test actions. My instinct says, "oh, just push to a local registry", but that doesn't work when CI is running on GH Actions in their runners.

I guess it looks good, then, but do you mind adding something to the docs about testing, i.e. how to do what you just described? "in your own fork, add secrets, etc."

Then we need @displague to add the necessary secrets before merging.

@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

So, one could use https://github.com/nektos/act for testing locally, but last time I tried it I ran into all sorts of issues when testing and not being able to replicate the github actions environment enough for things like artifacts, caching, and interacting with a ghcr.io registry.

@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

Secrets have been added, I'll work on updating the documentation here shortly

…and quay

Signed-off-by: Jason DeTiberus <detiber@users.noreply.github.com>
@detiber detiber changed the title [WIP] Update automated workflow to allow for overriding orgs for dockerhub and quay Update automated workflow to allow for overriding orgs for dockerhub and quay Apr 6, 2022
@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

@deitch this should be ready to go now :)

Copy link
Contributor

@deitch deitch left a comment

Choose a reason for hiding this comment

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

LGTM. Still needs to wait for secrets from @displague ?

@detiber
Copy link
Member Author

detiber commented Apr 6, 2022

LGTM. Still needs to wait for secrets from @displague ?

Nope, I updated the secrets a bit ago after @displague sent them my way.

@deitch
Copy link
Contributor

deitch commented Apr 6, 2022

Cool. Then let's do it!

@deitch deitch merged commit b6bfce7 into kubernetes-sigs:master Apr 6, 2022
@detiber detiber deleted the allowOrgOverride branch April 6, 2022 20:11
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.

None yet

2 participants