-
Notifications
You must be signed in to change notification settings - Fork 20
chore: get agent version from datadog-agent changelog #1144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
8349e93
64f2554
1c875ff
bd66093
d18835d
023c1ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ on: | |
| - "no" | ||
| agentVersion: | ||
| type: string | ||
| description: Datadog agent version | ||
| description: Datadog agent version (default: latest release tag from Datadog agent branch) | ||
| agentBranch: | ||
| type: string | ||
| description: Datadog agent branch or tag name (default main) | ||
|
|
@@ -53,6 +53,15 @@ jobs: | |
| ref: ${{ github.event.inputs.agentBranch }} | ||
| path: datadog-agent | ||
|
|
||
| - name: Compute agent version | ||
| id: meta | ||
| run: | | ||
| AGENT_VERSION="${{ github.event.inputs.agentVersion }}" | ||
| if [ -z "$AGENT_VERSION" ]; then | ||
| AGENT_VERSION=$(git -C datadog-agent tag --sort=-version:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -1) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The fallback lookup uses Useful? React with 👍 / 👎.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated to get the agent version from CHANGELOG, which should be the CHANGELOG from the checked-out branch |
||
| fi | ||
| echo "agent_version=${AGENT_VERSION}" >> "$GITHUB_OUTPUT" | ||
|
Comment on lines
+56
to
+63
|
||
|
|
||
| # Pin QEMU to a known-good version. The default (binfmt:latest) has broken | ||
| # arm64 emulation multiple times due to QEMU segfaults in libc-bin triggers: | ||
| # - Feb 2025: qemu-v9.2.0 — PR #571 pinned, PR #581 reverted to :latest | ||
|
|
@@ -76,7 +85,7 @@ jobs: | |
| VERSION: ${{ github.event.inputs.tag }} | ||
| SERVERLESS_INIT: true | ||
| ALPINE: ${{ matrix.arrays.isAlpine }} | ||
| AGENT_VERSION: ${{ github.event.inputs.agentVersion }} | ||
| AGENT_VERSION: ${{ steps.meta.outputs.agent_version }} | ||
|
|
||
| - name: Set up build directory and copy binaries | ||
| run: | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command assumes release tags are present locally, but both workflows check out
datadog-agentwithactions/checkout@v6defaults and do not enable tag/history fetch. In that default checkout mode,git tagis empty, so this pipeline (git tag | grep ... | head -1) yields no match; under GitHub Actions’ defaultbash -eo pipefail, thegrepexit code fails the step and blocks nightly builds (and release runs whenagentVersionis left blank).Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to get agent version from CHANGELOG instead of using tag fetch in 1c875ff