Kirk Fitzsimons
unread,Mar 22, 2024, 5:59:38 AMMar 22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to job-dsl-plugin
Hi,
I am trying to convert pipeline jobs to dsl, I have converted all the elements in the source job config.xml to dsl, but I am unsure what to do with the <actions> element in the xml
Source job config.xml:
<actions>
<org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction plugin="pipeline-mod...@2.2114.v2654ca_721309"/>
<org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction plugin="pipeline-mod...@2.2114.v2654ca_721309">
<jobProperties>
<string>org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty</string>
<string>jenkins.model.BuildDiscarderProperty</string>
</jobProperties>
<triggers>
<string>hudson.triggers.TimerTrigger</string>
</triggers>
<parameters/>
<options/>
</org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction>
</actions>
In the job dsl I have used the following configure block to generate the above:
configure { flowdefinition ->
flowdefinition / 'actions' << 'org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction'(plugin:'pipeline-mod...@2.2114.v2654ca_721309')
flowdefinition / 'actions' << 'org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction'(plugin:'pipeline-mod...@2.2114.v2654ca_721309') {
'jobProperties' {
'string'('org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty')
'string'('jenkins.model.BuildDiscarderProperty')
}
'triggers' {
'string'('hudson.triggers.TimerTrigger')
}
'parameters'()
'options'()
}
}
It works.
But my question is, am i doing the correct thing, should actions get converted/translated? I can not see any documentation on how to handle actions?
Kirk