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

CI Images: Don't push floating tags from feature branches #28044

Merged
merged 1 commit into from Sep 19, 2023

Conversation

michi-covalent
Copy link
Contributor

@michi-covalent michi-covalent commented Sep 8, 2023

Floating tags like "latest" or "v1.14" should only be pushed from main and stable branches.

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Sep 8, 2023
@michi-covalent michi-covalent added the release-note/ci This PR makes changes to the CI. label Sep 8, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Sep 8, 2023
@michi-covalent
Copy link
Contributor Author

i guess it does what we want, but it doesn't feel very elegant. requesting review from @nbusseneau to see if he has any suggestions 🚀 🙏 ✨

@michi-covalent michi-covalent marked this pull request as ready for review September 8, 2023 21:30
@michi-covalent michi-covalent requested review from a team as code owners September 8, 2023 21:30
@michi-covalent
Copy link
Contributor Author

/test

Copy link
Member

@nbusseneau nbusseneau left a comment

Choose a reason for hiding this comment

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

Yeah I don't know... Technically we should split these steps into separate jobs and then have the if at the job level, instead of copy-pasting around on all steps. But at the same time these workflows are a mess and doing such a refactor is not trivial...

.github/workflows/build-images-ci.yaml Outdated Show resolved Hide resolved
@maintainer-s-little-helper maintainer-s-little-helper bot added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Sep 11, 2023
Copy link
Member

@nbusseneau nbusseneau left a comment

Choose a reason for hiding this comment

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

Wrong button. Too used to just approving your PRs.

@maintainer-s-little-helper maintainer-s-little-helper bot removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 11, 2023
Floating tags like "latest" or "v1.14" should only be pushed from main
or stable branches.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
@michi-covalent
Copy link
Contributor Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 19, 2023
@nbusseneau nbusseneau merged commit 762adff into main Sep 19, 2023
244 checks passed
@nbusseneau nbusseneau deleted the pr/michi/feature branch September 19, 2023 15:32
michi-covalent added a commit to michi-covalent/cilium that referenced this pull request Sep 19, 2023
Define a variable for CI image floating tags instead of hardcoding it.

- For the main branch, the floating tag is "latest".
- For stable branches, the floating tag is the same as the branch name
  (e.g. "v1.14").

This commit was initially introduced in cilium#28008, but it got reverted
because it tried to push floating tags for feature branches and failed.
Now that cilium#28044 is merged, this workflow no longer pushes floating tags
from feature branches.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
michi-covalent added a commit to michi-covalent/cilium that referenced this pull request Sep 19, 2023
Define a variable for CI image floating tags instead of hardcoding it.

- For the main branch, the floating tag is "latest".
- For stable branches, the floating tag is the same as the branch name
  (e.g. "v1.14").

This commit was initially introduced in cilium#28008, but it got reverted
because it tried to push floating tags for feature branches and failed.
Now that cilium#28044 is merged, this workflow no longer pushes floating tags
from feature branches. Therefore it is safe to use github.ref_name as a
floating tag.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
michi-covalent added a commit that referenced this pull request Sep 21, 2023
Define a variable for CI image floating tags instead of hardcoding it.

- For the main branch, the floating tag is "latest".
- For stable branches, the floating tag is the same as the branch name
  (e.g. "v1.14").

This commit was initially introduced in #28008, but it got reverted
because it tried to push floating tags for feature branches and failed.
Now that #28044 is merged, this workflow no longer pushes floating tags
from feature branches. Therefore it is safe to use github.ref_name as a
floating tag.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
gandro pushed a commit to gandro/cilium that referenced this pull request Oct 10, 2023
[ upstream commit 5b55b65 ]

Define a variable for CI image floating tags instead of hardcoding it.

- For the main branch, the floating tag is "latest".
- For stable branches, the floating tag is the same as the branch name
  (e.g. "v1.14").

This commit was initially introduced in cilium#28008, but it got reverted
because it tried to push floating tags for feature branches and failed.
Now that cilium#28044 is merged, this workflow no longer pushes floating tags
from feature branches. Therefore it is safe to use github.ref_name as a
floating tag.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
pchaigno pushed a commit that referenced this pull request Jan 8, 2024
[ upstream commit 5b55b65 ]

Define a variable for CI image floating tags instead of hardcoding it.

- For the main branch, the floating tag is "latest".
- For stable branches, the floating tag is the same as the branch name
  (e.g. "v1.14").

This commit was initially introduced in #28008, but it got reverted
because it tried to push floating tags for feature branches and failed.
Now that #28044 is merged, this workflow no longer pushes floating tags
from feature branches. Therefore it is safe to use github.ref_name as a
floating tag.

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants