From 174c0174a6c9b2a5974d509de7472f8dddd9c2cc Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Sat, 21 Dec 2024 14:05:54 -0800 Subject: [PATCH] Use dockerd builtin buildkit --- .github/workflows/ci.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a16cf445..c216d32b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -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