Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/post-release-agent-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- chart: pipeline-control-gateway
agent-type: PipelineControlGateway
config-directory: charts/pipeline-control-gateway/.fleetControl
- chart: agent-control-deployment
agent-type: NRAgentControl
config-directory: charts/agent-control-deployment/.fleetControl
fail-fast: false

steps:
Expand All @@ -51,14 +54,20 @@ jobs:
with:
ref: ${{ github.event.release.tag_name }}

- name: Extract version from release tag
- name: Extract version from release tag or Chart.yaml
if: steps.should-run.outputs.match == 'true'
id: version
run: |
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#${{ matrix.chart }}-}"
if [[ "${{ matrix.chart }}" == "agent-control-deployment" ]]; then
VERSION=$(yq '.appVersion' charts/${{ matrix.chart }}/Chart.yaml | tr -d '"')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcoscollanr we are about to remove the appVersion and move back the tag to the values to improve our release process. So once that change is merged the tag will be under values.yaml image.tag

echo "Extracted version from Chart.yaml appVersion: $VERSION"
Comment on lines +61 to +63
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the version we need is not .appVersion (which matches with the agent-control docker image) but .version which identifies this chart's version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, I did this on purpose.

The main idea is that we want the version to be the same as in the hosts, for the requirements. We can say this works with this version of agent-control

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have just discussed it offline, this version is not used for self-update but requirements therefore, we do need the appVersion which tells us that the version of the Agent Control binaries is available to be used in K8s. When working on the self-update experience, we will also need the chart-version.

else
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#${{ matrix.chart }}-}"
echo "Extracted version from tag: $VERSION"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION for chart ${{ matrix.chart }}"
echo "Final version: $VERSION for chart ${{ matrix.chart }}"

- name: Check .fleetControl directory
if: steps.should-run.outputs.match == 'true'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Documentation: https://newrelic.atlassian.net/wiki/spaces/INST/pages/4609638833/CDD+Metadata+to+be+stored
configurationDefinitions:
- platform: KUBERNETESCLUSTER
description: agent control configuration
type: agent-control-config
version: 1.0.0
Loading