-
Notifications
You must be signed in to change notification settings - Fork 168
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-68363] - Fix dynamic DSL plugins handling in job DSL #156
[JENKINS-68363] - Fix dynamic DSL plugins handling in job DSL #156
Conversation
ba862c7
to
923ace9
Compare
923ace9
to
40429e0
Compare
This commit fixes working with dynamic DSL plugins in job DSL integration code, namely in promotion actions processing.
40429e0
to
cd9e806
Compare
TopLevelItem item = j.jenkins.getItem("dynamic-dsl-test"); | ||
File config = new File(item.getRootDir(), "promotions/Development/config.xml"); | ||
String content = Files.readString(config.toPath()); | ||
assert content.contains("<javaposse.jobdsl.plugin.ExecuteDslScripts"); |
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.
Damn merged to early!
Generally please avoid using an assert
for a non boolean primative.
If things fail, you just get a failure, rather it is better to use a higher level framework such as hamcrest so that when things fail you are told that "the needle does not exist in the haystack" (as the haystack can lead you directly to the cause/fix)
This commit fixes working with dynamic DSL plugins in job DSL integration code, namely in promotion actions processing.
Currently an attempt to use a dynamic DSL plugin in promotion actions causes Jenkins to raise an exception because dynamic DSL plugin nodes seem to have a different layout than a regular job DSL plugin.
See JENKINS-68363.
Your checklist for this pull request
Restricted
(docs)CC
@oleg-nenashev @raul-arabaolaza