-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1966 from buildkite/agent_ubuntu_2204
- Loading branch information
Showing
11 changed files
with
164 additions
and
5 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
FROM ubuntu:22.04 | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
ARG DOCKER_COMPOSE_VERSION=1.27.4 | ||
|
||
RUN <<BASH | ||
#!/usr/bin/env bash | ||
|
||
set -eufo pipefail | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
bash \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
gnupg-agent \ | ||
jq \ | ||
openssh-client \ | ||
perl \ | ||
python3 \ | ||
python3-pip \ | ||
rsync \ | ||
software-properties-common \ | ||
tini | ||
|
||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | ||
add-apt-repository "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | ||
apt-get update | ||
apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
pip3 install docker-compose==$DOCKER_COMPOSE_VERSION | ||
|
||
ln -s /usr/bin/tini /usr/sbin/tini | ||
|
||
mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins | ||
curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh | ||
chmod +x /usr/local/bin/ssh-env-config.sh | ||
BASH | ||
|
||
ENV BUILDKITE_AGENT_CONFIG=/buildkite/buildkite-agent.cfg \ | ||
PATH="/usr/local/bin:${PATH}" | ||
|
||
COPY ./buildkite-agent.cfg /buildkite/buildkite-agent.cfg | ||
COPY ./buildkite-agent-$TARGETOS-$TARGETARCH /usr/local/bin/buildkite-agent | ||
COPY ./entrypoint.sh /usr/local/bin/buildkite-agent-entrypoint | ||
|
||
VOLUME /buildkite | ||
ENTRYPOINT ["buildkite-agent-entrypoint"] | ||
CMD ["start"] |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# The token from your Buildkite "Agents" page | ||
#token="xxx" | ||
|
||
# The name of the agent | ||
name="%hostname-%spawn" | ||
|
||
# The number of agents to spawn in parallel (default is "1") | ||
# spawn=1 | ||
|
||
# The priority of the agent (higher priorities are assigned work first) | ||
# priority=1 | ||
|
||
# Tags for the agent (default is "queue=default") | ||
# tags="key1=val2,key2=val2" | ||
|
||
# Include the host's EC2 meta-data as tags (instance-id, instance-type, and ami-id) | ||
# tags-from-ec2=true | ||
|
||
# Include the host's EC2 tags as tags | ||
# tags-from-ec2-tags=true | ||
|
||
# Include the host's Google Cloud instance meta-data as tags (instance-id, machine-type, preemptible, project-id, region, and zone) | ||
# tags-from-gcp=true | ||
|
||
# Include the host's Google Cloud instance labels as tags | ||
# tags-from-gcp-labels=true | ||
|
||
# Path to a custom bootstrap command to run. By default this is `buildkite-agent bootstrap`. | ||
# This allows you to override the entire execution of a job. Generally you should use hooks instead! | ||
# See https://buildkite.com/docs/agent/hooks | ||
# bootstrap-script="" | ||
|
||
# Path to where the builds will run from | ||
build-path="/buildkite/builds" | ||
|
||
# Directory where the hook scripts are found | ||
hooks-path="/buildkite/hooks" | ||
|
||
# Directory where plugins will be installed | ||
plugins-path="/buildkite/plugins" | ||
|
||
# Flags to pass to the `git clone` command | ||
# git-clone-flags=-v | ||
|
||
# Flags to pass to the `git clean` command | ||
# git-clean-flags=-ffxdq | ||
|
||
# Do not run jobs within a pseudo terminal | ||
# no-pty=true | ||
|
||
# Don't automatically verify SSH fingerprints | ||
# no-automatic-ssh-fingerprint-verification=true | ||
|
||
# Don't allow this agent to run arbitrary console commands | ||
# no-command-eval=true | ||
|
||
# Don't allow this agent to run plugins | ||
# no-plugins=true | ||
|
||
# Enable debug mode | ||
# debug=true | ||
|
||
# Don't show colors in logging | ||
# no-color=true | ||
|
||
# If set and valid, the given tracing backend will be enabled. Eg: datadog | ||
# tracing-backend="" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
DIR=/docker-entrypoint.d | ||
|
||
if [[ -d "$DIR" ]] ; then | ||
echo "Executing scripts in $DIR" | ||
/bin/run-parts --exit-on-error "$DIR" | ||
fi | ||
|
||
exec /usr/bin/tini -- ssh-env-config.sh /usr/local/bin/buildkite-agent "$@" |