-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[CI] Package elastic agent job #38011
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
os.Setenv(snapshotEnv, "true") | ||
mage.Snapshot = true | ||
} | ||
os.Setenv("BEAT_VERSION", parsedVersion.CoreVersion()) |
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.
Why does the 7.17 branch need to set the version from a manifest file? Can't it always use the version in the branch?
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.
Do you mean to hardcode 7.17
?
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.
No I don't understand what this manifest file block is doing. Is this something that applies to all DRA built projects?
Mostly I want to double check that this isn't something from the elastic-agent repository that was done support early agent releases that isn't actually needed here. The early agent releases work flow can't work for 7.17 as it is missing the changes the agent itself needed to support it.
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.
It was introduced before the faster agent release project was started. If I understand correctly, it get the version from a provided manifest(specified in build params) and just sets it to BEAT_VERSION
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.
Got it, it came from here and is used to know which dependency versions to download. elastic/elastic-agent#2727
I still don't really understand why it sets BEAT_VERSION since I doubt that ever doesn't match the version in the branch.
.buildkite/x-pack/elastic-agent/pipeline.xpack.elastic-agent.package.yml
Outdated
Show resolved
Hide resolved
"strings" | ||
) | ||
|
||
// regexp taken from https://semver.org/ (see the FAQ section/Is there a suggested regular expression (RegEx) to check a SemVer string?) |
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.
Would github.com/Masterminds/semver work here? Could it be used instead of this regexp to parse the semver?
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.
I think it would be better to use the semver. I just brought this code from the elastic-agent repo just for consistency
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.
We can move this code from elastic-agent to elastic-agent-libs so you can just import it instead of copying it.
if devtools.PackagingFromManifest { | ||
fmt.Println(">>>> Using manifest to package Agent") | ||
if manifestResponse, err := manifest.DownloadManifest(devtools.ManifestURL); err != nil { | ||
log.Panicf("failed to download remote manifest file %s", err) |
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.
Why panic here instead of returning an error?
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.
I see we often use panic in our magefiles instead of returning an error. Honestly, I don't know why we do that. Perhaps for simplification
💚 Build Succeeded
History
cc @pazone |
💔 Build Failed
Failed CI StepsHistory
cc @pazone |
💚 Build Succeeded
History
cc @pazone |
💔 Build Failed
Failed CI Steps
History
cc @pazone |
💔 Build Failed
Failed CI StepsHistory
cc @pazone |
💔 Build Failed
Failed CI Steps
History
cc @pazone |
💔 Build Failed
Failed CI Steps
History
cc @pazone |
💔 Build Failed
Failed CI StepsHistory
cc @pazone |
💚 Build Succeeded
History
cc @pazone |
💚 Build Succeeded
History
cc @pazone |
@cmacknz Apologies for intruding, this PR is a blocker for the unified release |
This was merged with the check step failing, several of the files use the wrong license type for Beats and are showing up in other PRs. https://github.com/elastic/beats/pull/38432/files |
Proposed commit message
Externally triggered job for elastic-agent packaging and publishing
Our release team is going to trigger this job from their pipeline
Relates #2644