-
Notifications
You must be signed in to change notification settings - Fork 473
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
Set effective version when building images #2500
Conversation
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.
Codewise looks fine.
I have some concerns about this change.
git rev-parse HEAD
is the commit hash of the last commit which might be something already merged in the master branch, but not your local changes. With this said, before building the image, the changes needs to be committed to get their own commit hash. For example, if I am deploying from master and you build and push local image based on same commit from master, I will use your local changes instead of the current master.
e73b74b
to
3b1300f
Compare
Thanks for your comments, that's a valid concern 👍 |
3b1300f
to
5fd8baf
Compare
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
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.
Nice, thanks for implementing the "dirty" use-case 😄
/lgtm
How to categorize this PR?
/area dev-productivity
/kind enhancement
/priority normal
What this PR does / why we need it:
With this PR, docker images built by
make docker-images
are tagged and build with a version including the commit hash (exactly like the images built by the pipeline).This allows developers to build prerelease images with a correct version inside to evaluate a new release. E.g. the gardenlet uses the
pkg/version.gitVersion
to report its own version and to the deploy the same gardenlet image version into shooted Seeds.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: