Fix Kube attach strategy to work with no root images
What does this MR do?
Fixes the permisions of the logs
directory for non-root images which is shared between the helper and build containers. By default the directory is owned and only writeable by root.
Why was this MR needed?
Otherwise we wouldn't be able to create logs so the build will hang, waiting for logs and exit signals.
What's the best way to test this MR?
make clean helper-build helper-docker
go test -ldflags "-X gitlab.com/gitlab-org/gitlab-runner/common.NAME=gitlab-runner -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=13.2.0~beta.303.$(git rev-parse --short=8 HEAD) -X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=$(git rev-parse --short=8 HEAD) -X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=2020-06-24T15:36:24+0000 -X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH=fix_attach_incorrect_exit_code" -run TestRunTestsWithFeatureFlag/testKubernetesNoRootImage -v ./executors/kubernetes/...
The testKubernetesNoRootImage
tests should pass with both feature flag values.
What are the relevant issue numbers?
Closes #26422 (closed)