Could somebody give me a useful link, where I can find information about converting the complex xml configuration for Jenkins jobs?
Here is a Jenkins job example:
<project>
<actions/>
<description>Description</description>
<logRotator class="hudson.tasks.LogRotator">
<!-- ...-->
</logRotator>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty/><!-- ...-->
</properties>
<scm class="org.jenkinsci.plugins.multiplescms.MultiSCM" plugin="[email protected]">
<scms>
<hudson.plugins.git.GitSCM plugin="[email protected]"/><!-- ...-->
<hudson.plugins.git.GitSCM plugin="[email protected]"/><!-- ...-->
</scms>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<jdk>Default</jdk>
<triggers>
<hudson.triggers.TimerTrigger/><!-- ...-->
</triggers>
<concurrentBuild>false</concurrentBuild>
<customWorkspace>$HUDSON_WD/$REVISION/checkout</customWorkspace>
<builders/>
<publishers>
<hudson.plugins.globalenvvar.GlobalEnvironmentVariablePublisher plugin="[email protected]"/><!-- ...-->
<hudson.plugins.parameterizedtrigger.BuildTrigger plugin="[email protected]"/><!-- ...-->
<hudson.plugins.templateproject.ProxyPublisher plugin="[email protected]"/><!-- ...-->
</publishers>
<buildWrappers>
<hudson.plugins.timestamper.TimestamperBuildWrapper plugin="[email protected]"/>
</buildWrappers>
</project>
In my experience, it is an entirely manual process of re-writing. Reference material is at https://jenkinsci.github.io/job-dsl-plugin/#.
Many elements in the xml are defaulted, so much of the xml can be skipped. It is only necessary to convert the xml element-by-element if the DSL does not directly support the plugin or feature of the plugin that you have configured.
Conversion process is as follows:
If you're not sure which plugin is providing the job element, you can often see the plugin name in the help-text for that element (click on the little question-mark icon). Otherwise, the xml element often contains the plugin name.
Also good to know is that the job elements are broken out in the same way in the DSL as they are on the Configure screen in Jenkins. So if it is a Trigger, then you can find it in the DSL under triggers.
Simple example (I know, yours is much more complex):
freeStyleJob("Arthur's Example") {
description('Description')
logRotator(30)
}