File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 run : |
3737 STAMP=$(date -u +%Y%m%d)
3838 SHORT_SHA=$(git -C datadog-agent rev-parse --short=8 HEAD)
39+ AGENT_VERSION=$(grep -m 1 -E '^[0-9]+\.[0-9]+\.[0-9]+$' datadog-agent/CHANGELOG.rst) || { echo "ERROR: could not detect agent version from datadog-agent's CHANGELOG.rst"; exit 1; }
3940 echo "stamp=${STAMP}" >> "$GITHUB_OUTPUT"
4041 echo "short_sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT"
4142 echo "version=nightly-${STAMP}-${SHORT_SHA}" >> "$GITHUB_OUTPUT"
43+ echo "agent_version=${AGENT_VERSION}" >> "$GITHUB_OUTPUT"
4244
4345 # Pin QEMU to a known-good version. See release-serverless-init.yml
4446 # and test-qemu-versions.yml for context on QEMU breakage history.
5658 env :
5759 AGENT_PATH : datadog-agent
5860 VERSION : ${{ steps.meta.outputs.version }}
61+ AGENT_VERSION : ${{ steps.meta.outputs.agent_version }}
5962 SERVERLESS_INIT : " true"
6063 ALPINE : ${{ matrix.arrays.isAlpine }}
6164
Original file line number Diff line number Diff line change 2222 - " no"
2323 agentVersion :
2424 type : string
25- description : Datadog agent version
25+ description : Datadog agent version (default latest release tag from Datadog agent branch)
2626 agentBranch :
2727 type : string
2828 description : Datadog agent branch or tag name (default main)
5353 ref : ${{ github.event.inputs.agentBranch }}
5454 path : datadog-agent
5555
56+ - name : Compute agent version
57+ id : meta
58+ run : |
59+ AGENT_VERSION="${{ github.event.inputs.agentVersion }}"
60+ if [ -z "$AGENT_VERSION" ]; then
61+ AGENT_VERSION=$(grep -m 1 -E '^[0-9]+\.[0-9]+\.[0-9]+$' datadog-agent/CHANGELOG.rst) || { echo "ERROR: could not detect agent version from datadog-agent's CHANGELOG.rst; set the Datadog agent version manually"; exit 1; }
62+ fi
63+ echo "agent_version=${AGENT_VERSION}" >> "$GITHUB_OUTPUT"
64+
5665 # Pin QEMU to a known-good version. The default (binfmt:latest) has broken
5766 # arm64 emulation multiple times due to QEMU segfaults in libc-bin triggers:
5867 # - Feb 2025: qemu-v9.2.0 — PR #571 pinned, PR #581 reverted to :latest
7685 VERSION : ${{ github.event.inputs.tag }}
7786 SERVERLESS_INIT : true
7887 ALPINE : ${{ matrix.arrays.isAlpine }}
79- AGENT_VERSION : ${{ github.event.inputs.agentVersion }}
88+ AGENT_VERSION : ${{ steps.meta.outputs.agent_version }}
8089
8190 - name : Set up build directory and copy binaries
8291 run : |
You can’t perform that action at this time.
0 commit comments