EmbarkStudios / k8s-buildkite-plugin

Run any buildkite build step as a Kubernetes Job
https://embark.dev
Apache License 2.0
49 stars 19 forks source link

Do not mount buildkite-agent when building CI image with Kaniko #57

Closed tgolsson closed 1 year ago

tgolsson commented 1 year ago

Kaniko will mount some extra host directories into the build context. All files included in that context will be forbidden from being added to layers, and Kaniko will silently drop them from the build. Since we use kaniko from inside the plugin, we mounted the "host" buildkite-agent, which prevented the COPY command from copying the multistage sourced buildkite-agent (since it thought we tried to copy the host buildkite-agent). Very confusing.

Should help #56.

Also adds a non-master build-step to build debug-ci images, to avoid interacting with :latest