Skip to content

Fix build variable interpolation

The BUILD_IMAGE_TAG is getting set to the literal string GIT_TAG instead of its value.

Another issue that is coming up for me now that I'm trying to use the prebuilt :latest image... if build/deployment/gitlab-agent/base/secrets/agent.token doesn't already exist when the container image is built you get:

$ docker run --rm -it bazel/cmd/cli:container generate --agent-token "foo" --kas-address grpc://example.com
Program aborted: open /app/kpt-package/base/secrets/agent.token: permission denied

This didn't occur during local testing because I had an uncommitted agent.token file in my local repo from testing the standalone kpt package.

I'm not sure how to fix this because the permissions are already set to 0777 on everything in build/deployment/BUILD.bazel. I thought about just adding an empty placeholder agent.token file, but evidently there is no way to git add -f a file and still keep future changes untracked.

/cc @tkuah @ash2k

Merge request reports