Add BuildKite agent.

This has no effect on the continuous integration system, and simply
publishes a cached container image containing the agent and metrics
agent with known provenance.

PiperOrigin-RevId: 345274375
This commit is contained in:
Adin Scannell 2020-12-02 11:26:03 -08:00 committed by gVisor bot
parent 7ccb0b6a7c
commit dbd4a6e3e5
2 changed files with 19 additions and 0 deletions

12
images/agent/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM golang:1.15 as build-agent
RUN git clone --depth=1 --branch=v3.25.0 https://github.com/buildkite/agent
RUN cd agent && go build -i -o /buildkite-agent .
FROM golang:1.15 as build-agent-metrics
RUN git clone --depth=1 --branch=v5.2.0 https://github.com/buildkite/buildkite-agent-metrics
RUN cd buildkite-agent-metrics && go build -i -o /buildkite-agent-metrics .
FROM gcr.io/distroless/base-debian10
COPY --from=build-agent /buildkite-agent /
COPY --from=build-agent-metrics /buildkite-agent-metrics /
CMD ["/buildkite-agent"]

7
images/agent/README.md Normal file
View File

@ -0,0 +1,7 @@
# Build Agent
This is the image used by the build agent. It is built and bundled via a
separate packaging mechanism in order to provide local caching and to ensure
that there is better build provenance. Note that continuous integration system
will generally deploy new agents from the primary branch, and will only deploy
as instances are recycled. Updates to this image should be made carefully.