-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
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 looks like a very sensible and easy-to-understand approach. I like it. 💯
vars/beatsStages.groovy
Outdated
content?.stages?.each { stageName, value -> | ||
def tempMapOfStages = [:] | ||
if (value.containsKey('when')) { | ||
if (beatsWhen(project: project, content: value.when)) { |
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 don't understand the need for this nested if
conditional. It seems like both L33 and L36 are the same call?
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 one of the stages contain a when condition then it's required to evaluate it before building the stages, for instance:
stages:
stageA:
make: foo
stageB:
make: bar
when:
labels:
- 'foo'
There are two stages (stageA
and stageB
) but stageB
will be enabled only if the GitHub labels match with foo
. L32 is the one in charge of this evaluation.
…ibrary into feature/2.0-beats * 'feature/2.0-beats' of github.com:elastic/apm-pipeline-library: [jjbb] beats mbp is not required in the apm-ci anymore (#690)
… to identify the stage, since STAGE_NAME env variable is not available any more when creating stages dynamically
* upstream/master: dockerLogin step with less verbose output (#691)
* upstream/master: (21 commits) fix: remove params from JJB definition (#701) chore: convert regular pipeline for APM to mbp (#699) docs: update CHANGELOG.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v1.1.134 [CI] git commit with correct user.email (#700) docs: update CHANGELOG.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v1.1.133 fix read only env variable (#698) chore: include schedule in JJBB for APM specs sync (#696) docs: update CHANGELOG.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v1.1.132 Fix opbeans-frontend release process (#697) Use real email account (#695) chore: add force parameter to the JJBB job for APM specs sync (#693) docs: update CHANGELOG.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v1.1.131 ...
expected to call org.codehaus.groovy.runtime.MethodClosure.call but wound up catching WorkflowScript.runCommand; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ was caused when using the this.& function pointer This should help to avoid any kind of issues in the future in case the mismatch is forced to fail
Super-linter is broken, so this is unrelated to this PR |
* upstream/master: refactor: use env variables from the plugin (#426) docs: update CHANGELOG.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v1.1.137 Support multiple teams validation (#721) Fix isMemberOf data structure (#720) Revert "fix: run APM UI e2e tests for master branch only (#682)" (#713) docs: update CHANGELOG.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v1.1.136 2.0 pipeline steps for beats (#689) Remove timeout analyser and rebuild (#708) Support setEvnVar with booleans (#719) Move to fe/be config for apm-proxy (#718) Wrap checkout of spoa in dir (#717) chore: automate pickes (#714) New stage for apm-proxy (#712) docs: update CHANGELOG.md [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release v1.1.135
What does this PR do?
Specific steps for the beats 2.0 pipeline:
beatsWhen
beatsStages
That consume a YAML data structure such as:
Why is it important?
Simplify and reuse steps with some UT/ITs
Related issues
Caused elastic/beats#20104
Test
beatsWhen
beatsStages
Tasks
expected to call org.codehaus.groovy.runtime.MethodClosure.call but wound up catching WorkflowScript.runCommand; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
.