Skip to content

Commit f78abae

Browse files
Download task agent binaries directly via the Dockerfile
1 parent b10bfb3 commit f78abae

File tree

6 files changed

+9
-19
lines changed

6 files changed

+9
-19
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ jobs:
8585
- checkout
8686
- docker_login
8787
- run: ./do build-fake-agents
88-
- run: ./do download-taskagents
8988
- persist_to_workspace:
9089
root: .
9190
paths:

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ By following these guidelines, we can easily determine which changes should be i
1010

1111
## Edge
1212

13-
- [#10] [INTERNAL] Set up linting tools, initiated a changelog, and performed other configurations in preparation for the orchestration agent.
13+
- [#11](https://github.com/circleci/runner-init/pull/11) [INTERNAL] Download task agent binaries directly via the Dockerfile.
14+
- [#10](https://github.com/circleci/runner-init/pull/10) [INTERNAL] Set up linting tools, initiated a changelog, and performed other configurations in preparation for the orchestration agent.

do

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ set -eu -o pipefail
55
reportDir="test-reports"
66
GORELEASER_VERSION="v1.26.2"
77

8-
# This variable is used, but shellcheck can't tell.
9-
# shellcheck disable=SC2034
10-
help_download_taskagents="Download task agents via the picard image"
11-
download-taskagents() {
12-
id=$(docker create circleci/picard:agent)
13-
14-
docker cp "$id":/opt/circleci/linux/amd64/circleci-agent ./bin/circleci-agent-amd64
15-
docker cp "$id":/opt/circleci/linux/arm64/circleci-agent ./bin/circleci-agent-arm64
16-
17-
docker rm -v "$id"
18-
}
19-
208
# This variable is used, but shellcheck can't tell.
219
# shellcheck disable=SC2034
2210
help_build_fake_agents="Build the fake agent go binaries"

runner-init/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
FROM circleci/picard:agent as task-agent-image
2+
13
FROM busybox:stable-musl
24

35
ARG ARCH=amd64
46

5-
COPY ./bin/circleci-agent-${ARCH} /opt/circleci/circleci-agent
7+
COPY --from=task-agent-image /opt/circleci/linux/${ARCH}/circleci-agent /opt/circleci/bin/circleci-agent
68
COPY ./runner-init/init.sh /init.sh
79

8-
ENTRYPOINT ["/init.sh"]
10+
ENTRYPOINT ["/init.sh"]

runner-init/fake-agent.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM busybox:stable-musl as build
22

33
ARG ARCH=amd64
44

5-
COPY ./bin/circleci-fake-agent-${ARCH} /opt/circleci/circleci-agent
5+
COPY ./bin/circleci-fake-agent-${ARCH} /opt/circleci/bin/circleci-agent
66
COPY ./runner-init/init.sh /init.sh
77

8-
ENTRYPOINT ["/init.sh"]
8+
ENTRYPOINT ["/init.sh"]

runner-init/init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
dest=${1:?'task agent dest must be specified'}
44

5-
cp /opt/circleci/circleci-agent "$dest"/circleci-agent
5+
cp /opt/circleci/bin/circleci-agent "$dest"/circleci-agent
66
ln -s "$dest"/circleci-agent "$dest"/circleci

0 commit comments

Comments
 (0)