summaryrefslogtreecommitdiffhomepage
path: root/images/agent
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-12-02 11:26:03 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-02 11:28:26 -0800
commitdbd4a6e3e581cc081f686096226873f3a39c0369 (patch)
treec1dc090751d5ddd917ddb5e0d8b2a1f7faf261e5 /images/agent
parent7ccb0b6a7cd7fa33f2d58484aed5cfe1709018ca (diff)
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
Diffstat (limited to 'images/agent')
-rw-r--r--images/agent/Dockerfile12
-rw-r--r--images/agent/README.md7
2 files changed, 19 insertions, 0 deletions
diff --git a/images/agent/Dockerfile b/images/agent/Dockerfile
new file mode 100644
index 000000000..1d8979390
--- /dev/null
+++ b/images/agent/Dockerfile
@@ -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"]
diff --git a/images/agent/README.md b/images/agent/README.md
new file mode 100644
index 000000000..acb57bd2f
--- /dev/null
+++ b/images/agent/README.md
@@ -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.