-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
[JENKINS-51489] Use ATH pre configured plugins mode from essentialsTest #65
[JENKINS-51489] Use ATH pre configured plugins mode from essentialsTest #65
Conversation
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.
Just a UX concern. The implementation LGTM
vars/essentialsTest.groovy
Outdated
@@ -2,6 +2,7 @@ def call(Map params = [:]) { | |||
def baseDir = params.containsKey('baseDir') ? params.baseDir : "." | |||
def metadataFile = params.containsKey('metadataFile') ? params.metadataFile : "essentials.yml" | |||
def labels = params.containsKey('labels') ? params.labels : "docker && highmem" | |||
def pluginEvaluationOutcome = params.get("pluginEvaluationOutcome") ?: "failOnInvalid" |
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 argument name cannot be understood bu a user without reading docs.
I would rather prefe...
metadata:
testPluginResolution:
skipOnUnmetDependencies: true
with defaulting to failOnInvalid
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.
Absolutely, that makes it much more nicer, will update the PR
@@ -10,7 +11,9 @@ def call(Map params = [:]) { | |||
|
|||
dir(baseDir) { | |||
def metadataPath = "${pwd()}/${metadataFile}" | |||
metadata = readYaml(file: metadataPath) | |||
def configData = readYaml(file: metadataPath) |
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 variable was lacking a def
and I have changed the name of it to avoid having a metadata.metadata
in the code which may be misleading, and I like the idea of a metadata
section in the yml file
vars/essentialsTest.groovy
Outdated
@@ -10,7 +11,9 @@ def call(Map params = [:]) { | |||
|
|||
dir(baseDir) { | |||
def metadataPath = "${pwd()}/${metadataFile}" | |||
metadata = readYaml(file: metadataPath) | |||
def configData = readYaml(file: metadataPath) | |||
testPluginResolution = configData.metadata?.testPluginResolution?.skipOnUnmetDependencies ? "skipOnInvalid" : "failOnInvalid" |
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 this is allways failOnInvalid
unless you have:
metadata:
testPluginResolution:
skipOnUnmetDependencies: true
Some reasonable changes requested in the upstream PR, I am going to modify this a little bit to accommodate to the new code |
Regarding
Having a separate section sounds reasonable anyway, because the same setting may be required for Not sure what would be a better name tho |
@oleg-nenashev Yeah, I am all for a separate section because this is not intended to work on ath step alone, this setting makes sense in a concrete flow (essentials in this case) and the I am thinking on a
|
…H run Needed to be able to set the preconfigured plugins mode Also some rationalization of the final run params to make code more readable
bf4ab2f
to
a435806
Compare
@oleg-nenashev I had to fix some conflicts, all needed PR are already merged, can you re-bee this if you feel is worthwile? |
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.
After splitting the flow section to "ath" and "pct" I see no particular reason to keep it outside the main "ath" and "pct" sections. But whatever works
JENKINS-51489
Downstream of:
Modify
essentialsTest
so it uses the new pre configured plugins mode introduced in ATH#433@reviewbybees @oleg-nenashev @jglick