-
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
migrate packetbeat pipeline #37825
migrate packetbeat pipeline #37825
Conversation
This pull request doesn't have a |
💔 Build Failed
Expand to view the summary
Build stats
Pipeline error
❕ Flaky test reportNo test was executed to be analysed. 🤖 GitHub commentsExpand to view the GitHub comments
To re-run your PR in the CI, just comment with:
|
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
echo "The conditions don't match to requirements for generating pipeline steps." | ||
exit 1 |
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.
what's the reason for exit 1
? I'd expect it should do nothing
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.
If the conditions don't meet the requirements the $pipelineName
won't be created and the commands cat $pipelineName
and buildkite-agent pipeline upload $pipelineName
will return the error File not found
. I used the exit 1
:
to avoid additional conditions for the commands above
to avoid creating an empty file
to speed up the script if the changes don't meet the requirements
Probably, in this case, I could use exit 0
, but I just wanted to highlight the empty pipeline, and maybe I just need to add buildkite-agent annotate
option here. WDYT?
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.
If the conditions don't meet the requirements the $pipelineName won't be created and the commands cat $pipelineName and buildkite-agent pipeline upload $pipelineName will return the error File not found.
I understand the rationale for reporting an error if cat
or similar commands failed.
I understand the reason for filtering the filters defined in https://github.com/elastic/beats/blob/main/.buildkite/pull-requests.json.
However, I cannot understand the rationale for using a condition for the mandatory stages in the packetbeat pipeline for something other than doc changes.
Any PR touching the docs should not run the mandatory or any other stages unless a GitHub comment or similar UI interactions are used.
Is there any other condition for the mandatory stages that must be considered?
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.
The condition related to the DOCS is contained in the main pipeline and it will be implemented a bit later. Right now we have to see all pipelines are GREEN whenever we change something to understand how current changes affect our previous job.
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.
what's the reason for
exit 1
? I'd expect it should do nothing
BTW, I've changed to exit 0
, in this case, if nothing changed - it's fine and should be GREEN, I think.
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.
Basically LGTM from me.
I left an ask for better handling of when we run buildkite-agent ...
in common.sh
to make manual reproductions easier.
.buildkite/scripts/common.sh
Outdated
@@ -10,34 +10,45 @@ GITHUB_PR_TRIGGER_COMMENT=${GITHUB_PR_TRIGGER_COMMENT:-""} | |||
ONLY_DOCS=${ONLY_DOCS:-"true"} | |||
runLibbeat="$(buildkite-agent meta-data get runLibbeat --default ${runLibbeat:-"false"})" | |||
runMetricbeat="$(buildkite-agent meta-data get runMetricbeat --default ${runMetricbeat:-"false"})" | |||
runPacketbeat="$(buildkite-agent meta-data get runPacketbeat --default ${runPacketbeat:-"false"})" |
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.
A little unrelated to this PR, but what we are doing here makes manual reproductions difficult (i.e. this command fails when run manually). Could we improve the conditional such that buildkite-agent meta-data get
is run only if the env var runPackagebeat
is undefined or not false? (applies to all declarations here).
For context: https://elastic.slack.com/archives/C0D8SUKB2/p1707380999484699?thread_ts=1707312641.347669&cid=C0D8SUKB2
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 option is for the future main pipeline, where we will define the steps of the pipeline...
We have a similar variable in the main pipeline - runAllStages
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.
LGTM
(cherry picked from commit e4756b2)
(cherry picked from commit e4756b2)
💔 Build Failed
Failed CI StepsHistory
cc @sharbuz |
(cherry picked from commit e4756b2) Co-authored-by: sharbuz <[email protected]>
(cherry picked from commit e4756b2) Co-authored-by: sharbuz <[email protected]>
What is the problem this PR solves?
Jenkins->Buildkite pipelines migration
How does this PR solve the problem?
Migrates the
packetbeat
pipelinehttps://buildkite.com/elastic/beats-packetbeat/builds?branch=sharbuz%3Amigrate-packetbeat-pipeline
Example of the pipeline:
https://buildkite.com/elastic/beats-packetbeat/builds/1081
Examples of dependencies:
https://buildkite.com/elastic/beats-metricbeat/builds/2310
https://buildkite.com/elastic/beats-libbeat/builds/1083
Related issues
https://github.com/elastic/ingest-dev/issues/1693