mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
Jaeger does not make it easy to dump all the collected trace spans from all services at once. Switch to using the OpenTelemetry Collector with the OTLP File exporter which writes the traces straight to disk in a format that Jaeger UI can natively consume. Signed-off-by: Cory Snider <csnider@mirantis.com>
288 lines
8.8 KiB
YAML
288 lines
8.8 KiB
YAML
name: arm64
|
|
|
|
# Default to 'contents: read', which grants actions to read commits.
|
|
#
|
|
# If any permission is set, any permission not included in the list is
|
|
# implicitly set to "none".
|
|
#
|
|
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- '[0-9]+.[0-9]+'
|
|
- '[0-9]+.x'
|
|
pull_request:
|
|
|
|
env:
|
|
GO_VERSION: "1.25.4"
|
|
TESTSTAT_VERSION: v0.1.25
|
|
DESTDIR: ./build
|
|
SETUP_BUILDX_VERSION: edge
|
|
SETUP_BUILDKIT_IMAGE: moby/buildkit:latest
|
|
DOCKER_EXPERIMENTAL: 1
|
|
|
|
jobs:
|
|
validate-dco:
|
|
uses: ./.github/workflows/.dco.yml
|
|
|
|
build:
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 20 # guardrails timeout for the whole job
|
|
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
needs:
|
|
- validate-dco
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- binary
|
|
- dynbinary
|
|
steps:
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
buildkitd-flags: --debug
|
|
-
|
|
name: Build
|
|
uses: docker/bake-action@v6
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
-
|
|
name: List artifacts
|
|
run: |
|
|
tree -nh ${{ env.DESTDIR }}
|
|
-
|
|
name: Check artifacts
|
|
run: |
|
|
find ${{ env.DESTDIR }} -type f -exec file -e ascii -- {} +
|
|
|
|
build-dev:
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 120 # guardrails timeout for the whole job
|
|
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
needs:
|
|
- validate-dco
|
|
steps:
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
buildkitd-flags: --debug
|
|
-
|
|
name: Build dev image
|
|
uses: docker/bake-action@v6
|
|
with:
|
|
targets: dev
|
|
set: |
|
|
*.cache-from=type=gha,scope=dev-arm64
|
|
*.cache-to=type=gha,scope=dev-arm64
|
|
*.output=type=cacheonly
|
|
|
|
test-unit:
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 120 # guardrails timeout for the whole job
|
|
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
needs:
|
|
- build-dev
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Set up runner
|
|
uses: ./.github/actions/setup-runner
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
buildkitd-flags: --debug
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
-
|
|
name: Build dev image
|
|
uses: docker/bake-action@v6
|
|
with:
|
|
targets: dev
|
|
set: |
|
|
dev.cache-from=type=gha,scope=dev-arm64
|
|
-
|
|
name: Test
|
|
run: |
|
|
make -o build test-unit
|
|
-
|
|
name: Prepare reports
|
|
if: always()
|
|
run: |
|
|
mkdir -p bundles /tmp/reports
|
|
find bundles -path '*/root/*overlay2' -prune -o -type f \( -name '*-report.json' -o -name '*.log' -o -name '*.out' -o -name '*.prof' -o -name '*-report.xml' \) -print | xargs sudo tar -czf /tmp/reports.tar.gz
|
|
tar -xzf /tmp/reports.tar.gz -C /tmp/reports
|
|
sudo chown -R $(id -u):$(id -g) /tmp/reports
|
|
tree -nh /tmp/reports
|
|
-
|
|
name: Send to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
directory: ./bundles
|
|
env_vars: RUNNER_OS
|
|
flags: unit
|
|
token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
|
|
-
|
|
name: Upload reports
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: test-reports-unit-arm64-graphdriver
|
|
path: /tmp/reports/*
|
|
retention-days: 1
|
|
|
|
test-unit-report:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
|
if: always() && (github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only'))
|
|
needs:
|
|
- test-unit
|
|
steps:
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
cache: false
|
|
-
|
|
name: Download reports
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: test-reports-unit-arm64-*
|
|
path: /tmp/reports
|
|
-
|
|
name: Install teststat
|
|
run: |
|
|
go install github.com/vearutop/teststat@${{ env.TESTSTAT_VERSION }}
|
|
-
|
|
name: Create summary
|
|
run: |
|
|
find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY
|
|
|
|
test-integration:
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 120 # guardrails timeout for the whole job
|
|
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
|
if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only') }}
|
|
needs:
|
|
- build-dev
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Set up runner
|
|
uses: ./.github/actions/setup-runner
|
|
-
|
|
name: Set up tracing
|
|
uses: ./.github/actions/setup-tracing
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
version: ${{ env.SETUP_BUILDX_VERSION }}
|
|
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
|
|
buildkitd-flags: --debug
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
-
|
|
name: Build dev image
|
|
uses: docker/bake-action@v6
|
|
with:
|
|
targets: dev
|
|
set: |
|
|
dev.cache-from=type=gha,scope=dev-arm64
|
|
-
|
|
name: Test
|
|
run: |
|
|
make -o build test-integration
|
|
env:
|
|
TEST_SKIP_INTEGRATION_CLI: 1
|
|
TESTCOVERAGE: 1
|
|
-
|
|
name: Prepare reports
|
|
if: always()
|
|
run: |
|
|
docker stop otelcol
|
|
reportsPath="/tmp/reports/arm64-graphdriver"
|
|
mkdir -p bundles $reportsPath
|
|
find bundles -path '*/root/*overlay2' -prune -o -type f \( -name '*-report.json' -o -name '*.log' -o -name '*.out' -o -name '*.prof' -o -name '*-report.xml' \) -print | xargs sudo tar -czf /tmp/reports.tar.gz
|
|
tar -xzf /tmp/reports.tar.gz -C $reportsPath
|
|
mv /tmp/reports/otel-trace*.jsonl $reportsPath/
|
|
sudo chown -R $(id -u):$(id -g) $reportsPath
|
|
tree -nh $reportsPath
|
|
-
|
|
name: Send to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
directory: ./bundles/test-integration
|
|
env_vars: RUNNER_OS
|
|
flags: integration
|
|
token: ${{ secrets.CODECOV_TOKEN }} # used to upload coverage reports: https://github.com/moby/buildkit/pull/4660#issue-2142122533
|
|
-
|
|
name: Test daemon logs
|
|
if: always()
|
|
run: |
|
|
cat bundles/test-integration/docker.log
|
|
-
|
|
name: Upload reports
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: test-reports-integration-arm64-graphdriver
|
|
path: /tmp/reports/*
|
|
retention-days: 1
|
|
|
|
test-integration-report:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
continue-on-error: ${{ github.event_name != 'pull_request' }}
|
|
if: always() && (github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci/validate-only'))
|
|
needs:
|
|
- test-integration
|
|
steps:
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
cache: false
|
|
-
|
|
name: Download reports
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: /tmp/reports
|
|
pattern: test-reports-integration-arm64-*
|
|
merge-multiple: true
|
|
-
|
|
name: Install teststat
|
|
run: |
|
|
go install github.com/vearutop/teststat@${{ env.TESTSTAT_VERSION }}
|
|
-
|
|
name: Create summary
|
|
run: |
|
|
find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY
|