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 f749beb
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f749beb

Please sign in to comment.