-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the current stable agent image instead.
- Loading branch information
1 parent
b5811c8
commit ab07eb5
Showing
6 changed files
with
11 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,14 @@ | ||
#!/usr/bin/env bash | ||
#!/bin/sh | ||
|
||
set -eufo pipefail | ||
set -eu | ||
|
||
echo --- Installing packages | ||
apt update && apt install -y --no-install-recommends ca-certificates curl gnupg lsb-release jq | ||
mkdir -p /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ | ||
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list >/dev/null | ||
apt update && apt install -y docker-ce-cli | ||
apk add --update-cache --no-progress skopeo | ||
|
||
docker buildx create --driver kubernetes --use | ||
function cleanup { | ||
docker buildx rm | ||
} | ||
trap cleanup EXIT | ||
repo="docker.io/buildkite/agent" | ||
|
||
echo --- Installing just | ||
curl --proto '=https' --tlsv1.3 -sSf https://just.systems/install.sh | bash -s -- --to /bin | ||
echo --- :docker: Inspecting agent docker image manifest | ||
digest=$(skopeo inspect "docker://${repo}:stable" --format {{.Digest}}) | ||
|
||
echo --- Building agent docker image | ||
just agent ttl.sh/buildkite-agent:1h | ||
|
||
image=$(jq -r '"ttl.sh/buildkite-agent@\(."containerimage.digest")"' dist/metadata.json) | ||
buildkite-agent meta-data set agent-image "$image" | ||
echo Choosing image "${repo}@${digest}" | ||
buildkite-agent meta-data set agent-image "${repo}@${digest}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Brewfile.lock.json | ||
|
||
.DS_Store | ||
.vscode | ||
|
||
dist/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,5 +21,3 @@ | |
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
|
||
agent/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters