fix(ci): Provide correct build info for release builds (#15939) - #16214
Merged
Conversation
Then building a binary or image release for an upcoming version from a release branch, we provide the version using `--build-arg IMAGE_TAG=...` in the Docker build step of the CI workflow ([ref](https://github.com/grafana/loki/blob/3df08bd39f45bbf8314f31a59f35b955b9a31a5e/.github/workflows/minor-release-pr.yml#L456)). However, this argument was ignored in the Dockerfile and not further passed down to the `make ...` command inside build phase of the Dockerfile. Signed-off-by: Christian Haudum <christian.haudum@gmail.com> (cherry picked from commit 625bdab)
In order to access the variable ${IMAGE_TAG} that is provided as `--build-arg IMAGE_TAG=x.x.x` in the `docker build` command, the `ARG` definition in the Dockerfile needs to be inside the build step block, otherwise it is empty.
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit ed061b3)
salvacorts
marked this pull request as ready for review
February 12, 2025 12:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Then building a binary or image release for an upcoming version from a release branch, we provide the version using
--build-arg IMAGE_TAG=...in the Docker build step of the CI workflow (ref).However, this argument was ignored in the Dockerfile and not further passed down to the
make ...command inside build phase of the Dockerfile.Signed-off-by: Christian Haudum christian.haudum@gmail.com
(cherry picked from commit 625bdab)
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR