job.with {
steps {
gradle() {
tasks(commands)
switches('--info --no-daemon --stacktrace')
useWrapper()
rootBuildScriptDir(gradleDir)
makeExecutable()
fromRootBuildScriptDir()
configure { node -> // I tried first without the configure block but added the configure block to remove any differences in the xml representation.
node / useWorkspaceAsHome(false)
node.@plugin = 'gra...@1.24'
}
}
}
}
XML representation for the gradle build step when generating it using JobDsl(NOT-WORKING)
<builders>
<hudson.plugins.gradle.Gradle plugin="gra...@1.24"> <description/> <switches>--info --no-daemon --stacktrace</switches> <tasks>build</tasks> <rootBuildScriptDir>${workspace}/JobDsl</rootBuildScriptDir> <buildFile/> <gradleName>(Default)</gradleName> <useWrapper>true</useWrapper> <makeExecutable>true</makeExecutable> <fromRootBuildScriptDir>true</fromRootBuildScriptDir> <useWorkspaceAsHome>false</useWorkspaceAsHome> </hudson.plugins.gradle.Gradle> </builders>
XML representation for the gradle build step when manually adding it through JenkinsUI - WORKING
The XML representations is almost identical, the only thing I see is that JobDsl handles empty nodes differently.
Attaching full config.xml files when generating the job through JobDsl and when manually adding the gradle build step through the UI.
I am using JobDsl plugin 1.27 and Jenkins 1.580.1.
--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/ee4f89a9-d0bd-40ff-8550-3aab7b6fbad7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "job-dsl-plugin" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/job-dsl-plugin/kxIhU6I3SA4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/CAKqW32C1tLWjranJrXLxKXMKoo2WZrjuxj73wWAxcdumMaAJRw%40mail.gmail.com.