Fix helper-dockerarchive-alpine-latest make target using alpine:3.12 as base...
What does this MR do?
Fixes an issue where TARGET_FLAVOR_IMAGE_VERSION
for the helper-dockerarchive-alpine-latest
make target would be overwritten by alpine:3.12
instead of latest
on linux.
Why was this MR needed?
I honestly have no idea why this was occurring. You can see from #29188 (comment 1079785994) that the pipelines were picking up alpine:3.12
instead of alpine:latest
in CI, however, running the target locally on MacOS would pickup the correct version.
After a lot of experimenting and fumbling I was not able to figure out why TARGET_FLAVOR_IMAGE_VERSION
was getting overwritten with alpine:3.12
. I could figure out that swapping export TARGET_FLAVOR_IMAGE_VERSION ?= latest
to export TARGET_FLAVOR_IMAGE_VERSION := latest
works, which implies that TARGET_FLAVOR_IMAGE_VERSION
is already set when the target is executed, but I could not figure out why it's being set. It's either a bug in make
or some make black magic is happening which I can't understand.
In any case, with the renovate work !3592 (merged) we don't really need to set this variable anymore as it's redundant. If we straight up pass it as an argument it works fine.
make -version
output:
MacOS:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
Linux:
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
What's the best way to test this MR?
Helper images jobs should print the correct version as their base, e.g. for latest
- https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/3022093315
Same should happen locally when running make helper-dockerarchive-alpine-latest
or make helper-dockerarchive-alpine3.13
etc.
What are the relevant issue numbers?
Closes #29188 (closed)