• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None

      For the Job-DSL plugin on Jenkins CI website, I could not find an example of how to define the RTC Build Configuration  (i.e. Stream and Load Options)

      https://jenkinsci.github.io/job-dsl-plugin/#path/job-scm-rtc 

      Is it possible to include an example for defining the below config?

      Thanks

          [JENKINS-54345] Job-DSL RTC Build Definition

          If you use the Dynamic DSL - https://github.com/jenkinsci/job-dsl-plugin/wiki/Dynamic-DSL, those details are enough? 

          Then you can go to the <YOUR_JENKINS_URL>/plugin/job-dsl/api-viewer/index.html#plugin/teamconcert link to see those DSLs.

          This particular ticket regarding the JobDSL should be moved to another component. I'll do this now.

           

           

          Victor Martinez added a comment - If you use the Dynamic DSL - https://github.com/jenkinsci/job-dsl-plugin/wiki/Dynamic-DSL,  those details are enough?  Then you can go to the <YOUR_JENKINS_URL>/plugin/job-dsl/api-viewer/index.html#plugin/teamconcert link to see those DSLs. This particular ticket regarding the JobDSL should be moved to another component. I'll do this now.    

          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.

          Daniel Spilker added a comment - 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 .

          Len Isac added a comment - - edited

          Thanks v2v, daspilker.

          daspilker, would the configure block be something like the below?  I combined one of the examples in the Configure-Block link above and <JENKINS_URL>/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 added a comment - - edited Thanks v2v , daspilker . daspilker , would the configure block be something like the below?  I combined one of the examples in the Configure-Block link above and  <JENKINS_URL>/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.  

          lkisac, 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

          Daniel Spilker added a comment - lkisac , 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

          Len Isac added a comment -

          Can this be done with RTC?

          project / scm(class: 'hudson.scm.SubversionSCM') {

          The above is for SVN.

          Len Isac added a comment - Can this be done with RTC? project / scm(class: ' hudson.scm.SubversionSCM ') { The above is for SVN.

            mmccaskill Michael McCaskill
            lkisac01 lkis01
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: