Standardize Makefile target names
What does this MR do?
- It standardises the Makefile target names as per table in #26031 (closed).
- It adds a deprecation notice around replaced targets, redirecting them to the new target.
- It also fixes some glitches, e.g. it is now possible to generate a correct deb archive with
runner-and-helper-deb
, regardless of whether you're running on Linux or macOS. Previously it would generate a .deb with a Darwin gitlab-runner executable inside. - It changes
BUILD_PLATFORMS
to be an inclusion list, rather than an exclusion list. That makes it much more obvious what we are building. With the exclusion list, we wouldn't build e.g.linux/arm64
since it's not a default platform forgox
. - All binaries are generated with
gox
, even if we're building for the current platform. This makes the build process more consistent. The correct host platform binary is then copied toout/binaries/gitlab-runner
for ease of access and backward compatibility. -
build-and-deploy
now also builds the helper images in addition to the Runner binary. -
test
builds the Helper archive only for the host platform.
TODO: When rebasing we need to ensure that new references to old targets weren't introduced in master
and if so, we need to rename them (e.g. helper-build
in !2206 (diffs)).
Why was this MR needed?
To make target names more discoverable and intuitive.
What's the best way to test this MR?
Test different makefile target and confirm that they work the same way as before. Also test the old target names to confirm that they output a deprecation notice.
What are the relevant issue numbers?
Closes #26031 (closed)
Edited by Pedro Pombeiro