-
Notifications
You must be signed in to change notification settings - Fork 327
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
Test failing if script file includes *pipelineJob()* config #65
Comments
I have a similar problem. My understanding is that the actual error from the above info-log.txt is this:
It seems that the latest commit on JobScriptsSpec.groovy ( afcf9c4825) added code to generate debug xml. In my current scenario, the tests for the pipeline view returns NULL for jenkins.getView(viewName) when the code iterates over My work around is changing JobScriptsSpec slightly:
as a side, the actual xml for my pipeline is still written as part of the |
@wunzeco are you still seeing this issue? I just tried your example with the latest and it worked for me. I did add: testPlugins 'org.jenkins-ci.plugins.workflow:workflow-aggregator:2.4' |
@markus-mnm do you have an example that returns null? |
Hey. I am also running into the above NPE while iterating the views. Here is a short example reproducing the issue:
jobs.groovy:
It works when the view is not inside a folder! |
Needed these in build.gradle
And this is my pipeline and it works
|
Hey guys,
Since updating to the latest job-dsl-gradle-example (5a63306), the tests are failing on pipelineJob() config. For instance,
When I run
./gradlew test --info
I notice the warning below, which I reckon might be the cause. I've attached the output log.If anyone has idea how to overcome this issue, I'd be grateful. Jenkins Job DSL plugin is able to process the script file without any issue though. Right now I've had to disable
gradle test
for the moment until I can find/figure out a fix.info-log.txt
stacktrace-log.txt
The text was updated successfully, but these errors were encountered: