Skip to content

runner-and-helper-docker-host also builds other targets

Summary

make runner-and-helper-docker-host still tries to build the helper image for all platforms instead of host and might even fail with

Missing binary file. You probably need to run 'make helper-bin'.

Steps to reproduce

just run make runner-and-helper-docker-host on a clean working directory on a amd64 platform (you might have to run make deps before).

.gitlab-ci.yml
Add the job definition that is failing here

Actual behavior

Only:

Building helper image for: linux/arm

Expected behavior

Only:

Building helper image for: linux/amd64

Relevant logs and/or screenshots

When building on a amd64 host with make runner-and-helper-docker-host the Makefiles still want to build for other plattforms:

...
gox -osarch=linux/arm -ldflags "-X gitlab.com/gitlab-org/gitlab-runner/common.NAME=gitlab-runner -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=13.3.0~beta.276.gba5950c1 -X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=ba5950c1 -X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=2020-08-05T09:13:14+0000 -X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH=feature/add_node_affinity -s -w" -output=out/binaries/gitlab-runner-helper/gitlab-runner-helper.arm gitlab.com/gitlab-org/gitlab-runner/apps/gitlab-runner-helper
Number of parallel builds: 8

-->       linux/arm: gitlab.com/gitlab-org/gitlab-runner/apps/gitlab-runner-helper
Building helper image for: linux/arm
docker-buildx
Successfully created context "docker-buildx"
...
job log
Add the job log

Environment description

config.toml contents
Add your configuration here

Used GitLab Runner version

Workaround

make runner-and-helper-bin-host 'BINARIES=dockerfiles/build/binaries/gitlab-runner-helper.x86_64' 'TAR=out/helper-images/prebuilt-x86_64.tar.xz'