Skip to content
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

feat: add helm package mage target #7232

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

pkoutsovasilis
Copy link
Contributor

@pkoutsovasilis pkoutsovasilis commented Mar 6, 2025

What does this PR do?

This PR introduces a new Mage target, helm:package, to package the Elastic-Agent Helm chart.

This is a necessary step toward automating the Helm chart release process.

Why is it important?

This change is critical for supporting the release of Elastic-Agent Helm charts in a structured and automated manner:

  • Support producing both snapshot (DRA) and production (release) packages (controlled by explicitly setting SNAPSHOT="false" for production).

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I have made corresponding changes to the default configuration files.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added an entry in ./changelog/fragments using the changelog tool.
  • I have added an integration test or an E2E test.

Disruptive User Impact

This change does not introduce disruptive user impact but improves automation for Helm chart releases.

How to test this PR locally

mage helm:package

CI

Run https://buildkite.com/elastic/elastic-agent-helm-charts

Related issues

N/A

@pkoutsovasilis pkoutsovasilis added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog backport-8.x Automated backport to the 8.x branch with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch labels Mar 6, 2025
@pkoutsovasilis pkoutsovasilis self-assigned this Mar 6, 2025
@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review March 6, 2025 10:55
@pkoutsovasilis pkoutsovasilis requested a review from a team as a code owner March 6, 2025 10:55
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@pkoutsovasilis pkoutsovasilis marked this pull request as draft March 6, 2025 11:18
v1v added 2 commits March 6, 2025 19:20
* upstream/main:
  feat: bump go to 1.24.0 (elastic#6932)
  [CI] Fix Core DRA crossbuild (elastic#7203)
  fix(ci): Use correct `READ_ONLY` access value instead of `READ` (elastic#7239)
  ci(buildkite): add initial elastic-agent-helm-charts pipeline (elastic#7176)
  chore: update elastic-agent-libs to v0.18.8 (elastic#6938)
  [flakiness] Correct group for TestEndpointAgentServiceMonitoring (elastic#7165)
Comment on lines 19 to 21
plugins:
- elastic/oblt-google-auth#v1.0.0:
lifetime: 1800 # seconds
Copy link
Member

Choose a reason for hiding this comment

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

I use https://github.com/elastic/oblt-google-auth-buildkite-plugin

Still need to create the relevant copy file from local to the specific bucket


set -euo pipefail

echo "--- mage package tests"
Copy link
Member

Choose a reason for hiding this comment

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

typo

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
Copy link
Member

Choose a reason for hiding this comment

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

See

image


agentVersion := bversion.GetParsedAgentPackageVersion()
agentCoreVersion := agentVersion.CoreVersion()
agentImageTag := agentCoreVersion + "-SNAPSHOT"
Copy link
Member

@v1v v1v Mar 7, 2025

Choose a reason for hiding this comment

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

for some reason SNAPSHOT=true is not honoured

CHARTS_URL: "https://storage.googleapis.com/elastic-agent-helm-chart/elastic-agent-9.1.0-beta.tgz"

when using SNAPSHOT=true mage helm:package

is that the expected behaviour?

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @pkoutsovasilis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants