Skip to content

Refactor CI/CD builds #456

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

Merged
merged 11 commits into from
Jul 31, 2025

Conversation

chickenkiller
Copy link
Contributor

@chickenkiller chickenkiller commented Jul 17, 2025

This P/R makes the workflows a bit cleaner and enable the build and push of 2 versions of garm images.

  • The providers branch computation is done inside the Dockerfile now
  • It automatically computes the latest (non pre-release) release of each provider before cloning

@chickenkiller chickenkiller force-pushed the feat/refactor-builds branch from 235333c to 9487cff Compare July 29, 2025 06:52
@chickenkiller chickenkiller marked this pull request as draft July 29, 2025 12:16
@chickenkiller chickenkiller marked this pull request as ready for review July 30, 2025 07:25
Copy link
Member

@gabriel-samfira gabriel-samfira left a comment

Choose a reason for hiding this comment

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

This is awesome! Looks much cleaner. I have a few comments though. And also, do you think it makes sense to propose this against the main branch? I am not sure it needs to be merged only in the release/v0.1 branch, considering it can build for main, release/v0.1 and release/v0.2.

VERSION=$(git describe --tags --match='v[0-9]*' --always)
fi
if [ "$GH_REF" == "release/v0.1" ]; then
VERSION="v0.1"
Copy link
Member

Choose a reason for hiding this comment

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

This is to build the equivalent of nightly for the release branches. So we will have container images tagged:

  • garm:nightly
  • garm:v0.1.6
  • garm:v0.1
  • garm:v0.2

I worry that garm:v0.1.6 might be interpreted as being newer than garm:v0.1 whereas garm:v0.1 should in theory hold newer commits than any of the released stable versions.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so how about we use the tag stable instead of v0.1, and next instead of v0.2 ? We would have these tags:

  • garm:nightly
  • garm:stable
  • garm:next
  • garm:v0.1.6
  • [other releases]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another solution is to call the tag v0.1.x instead of v0.1

Copy link
Member

Choose a reason for hiding this comment

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

both release/v0.1 and release/v0.2 will release "stable" versions. It's just that v0.2.x is in theory a major release (I need to cut v1 at some point to make things easier) and has features/changes that are breaking from v0.1. For example, the garm operator works with v0.1.6. I would like to no longer break it (or any other integrations) for minor releases. So I would like for the release/v0.1 branch to only receive bug fixes and nothing that changes the API.

Eventually, v0.1 will be retired and no new versions will be released from that. But we need to go in parallel for a while to give people a chance to update and test.

Another solution is to call the tag v0.1.x instead of v0.1

As a general housekeeping rule, whenever I release a new stable version, the release/v0.x branch is incremented by 1 and an -alpha suffix is added, until we want to release a new version and we remove the suffix. So if we just released v0.1.6, we would also add a new commit to the release/v0.1 branch and tag that as v0.1.7-alpha. This way we can merge new things in the release branch and the version will appear to be newer.

I aim to do this for all branches (main included). So if we use git describe --tags, we should get a unique, incremental version. I am not sure though how to best mark the container image as "latest"/"nightly" relative to the branch it was cur from (latest v0.1, latest v0.2, etc). Not sure if it's important, either. In general, I would advise people to use stable releases. The "nightly" is for testing and can explode.

Copy link
Member

Choose a reason for hiding this comment

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

I should probably strive to not let the release branches contain unreleased changes for long. Do you think it's worth having nightlies for release branches if we step up release cadence?

Because we can make this easier that way and just have nightly (main) and stable releases (v0.1.7, v0.2.0 - eventually). Right now, main and release/v0.2 are equivalent.

Copy link
Member

Choose a reason for hiding this comment

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

I am trying to figure out how we could best do this, and keep it as least confusing as possible.

@chickenkiller chickenkiller force-pushed the feat/refactor-builds branch from f932cc4 to eb07ed3 Compare July 30, 2025 10:12
@chickenkiller chickenkiller changed the base branch from release/v0.1 to main July 30, 2025 10:12
@gabriel-samfira gabriel-samfira merged commit 8082e1a into cloudbase:main Jul 31, 2025
4 checks passed
@chickenkiller chickenkiller deleted the feat/refactor-builds branch July 31, 2025 08:06
@gabriel-samfira
Copy link
Member

thanks!

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.

2 participants