From f749beb94d5b43a39afa68c21a6a8fbef7bb180b 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 | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a16cf445..b67bb055 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,13 +88,20 @@ jobs: with: egress-policy: audit - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 with: go-version: '1.22' cache: false + - name: Configure dockerd + run: | + set -ex -o pipefail + + sudo mkdir -p /etc/docker + jq . <<< '{ "features": {"containerd-snapshotter": true} }' | sudo tee /etc/docker/daemon.json + sudo systemctl restart docker + - name: checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup jaeger run: | set -e @@ -103,8 +110,14 @@ jobs: echo "OTEL_EXPORTER_OTLP_ENDPOINT=http://${docker0_ip}:4318" >> "${GITHUB_ENV}" echo "OTEL_SERVICE_NAME=dalec-integration-test" >> "${GITHUB_ENV}" + sudo systemctl cat docker + sudo systemctl cat containerd + sudo cat /etc/containerd/config.toml || ok + 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 +130,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 +170,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