Skip to content

Commit

Permalink
Use dockerd builtin buildkit
Browse files Browse the repository at this point in the history
  • Loading branch information
cpuguy83 committed Dec 22, 2024
1 parent 2033d8b commit 174c017
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ jobs:
go-version: '1.22'
cache: false

- name: Configure dockerd
run: |
set -ex -o pipefail
sudo systemctl cat docker
sudo mkdir -p /etc/docker
sudo cat /etdc/docker/daemon.json
jq . <<< '{ "features": {"containerd-snapshotter": true} }' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
- name: Setup jaeger
run: |
set -e
Expand All @@ -104,7 +114,9 @@ jobs:
echo "OTEL_SERVICE_NAME=dalec-integration-test" >> "${GITHUB_ENV}"
tmp="$(mktemp)"
echo "Environment=\"OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318\"" > "${tmp}"
echo "[Service]" > "${tmp}"
echo "Environment=\"OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318\"" >> "${tmp}"
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo mkdir -p /etc/systemd/system/containerd.service.d
sudo cp "${tmp}" /etc/systemd/system/docker.service.d/otlp.conf
Expand All @@ -117,13 +129,13 @@ jobs:
# Tests currently require buildkit v0.12.0 or higher
# The version of buildkit builtin to moby currently (v24) is too old
# So we need to setup a custom builder.
- name: Set up builder
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver-opts: |
network=host
env.OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318
env.OTEL_SERVICE_NAME=buildkitd
# - name: Set up builder
# uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
# with:
# driver-opts: |
# network=host
# env.OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318
# env.OTEL_SERVICE_NAME=buildkitd

- name: download deps
run: go mod download
Expand Down Expand Up @@ -157,7 +169,7 @@ jobs:
mkdir -p /tmp/reports
curl -sSLf localhost:16686/api/traces?service=${OTEL_SERVICE_NAME} > /tmp/reports/jaeger-tests.json
curl -sSLf localhost:16686/api/traces?service=containerd > /tmp/reports/jaeger-containerd.json
curl -sSLf localhost:16686/api/traces?service=buildkitd > /tmp/reports/jaeger-buildkitd.json
curl -sSLf localhost:16686/api/traces?service=docker > /tmp/reports/jaeger-docker.json
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 174c017

Please sign in to comment.