The Dynamic DSL currently does not support the RTC SCM source, because it's constructor has a Secret parameter which is not supported by Structs plugin (JENKINS-34173).
But it's possible to generate the configuration using a configure block, see https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block.
Thanks Victor Martinez, Daniel Spilker.
Daniel Spilker, would the configure block be something like the below? I combined one of the examples in the Configure-Block link above and http://jenkins_prd_pipeline.fmr.com:8080/plugin/job-dsl/api-viewer/index.html#method/javaposse.jobdsl.dsl.helpers.ScmContext.rtc
job('example') { scm { rtc { buildDefinition('buildDefinitionInRTC') } configure { node -> // node represents <hudson.plugins.git.GitSCM> ?? } } }
Or is the above not supported for RTC as you mentioned?
I could not find a configure block specifically for RTC.
Len Isac, you must use the configure block of the job context, see https://jenkinsci.github.io/job-dsl-plugin/#path/job-configure
This example shows how to configure a complete SCM from scratch: https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block#configure-svn
Can this be done with RTC?
project / scm(class: 'hudson.scm.SubversionSCM') {
The above is for SVN.