• 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

          lkis01 created issue -
          lkis01 made changes -
          Description Original: 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)*

           

          Currently what is listed is:

          [https://jenkinsci.github.io/job-dsl-plugin/#path/job-scm-rtc
          job('example-1') {
              scm {
                  rtc {
                      buildDefinition('buildDefinitionInRTC')
                  }
              }
          }

          job('example-2') {
              scm {
                  rtc {
                      buildWorkspace('some-workspace')
                      connection('my-build-tool', 'build-user', 'https://localhost:9444/ccm', 60)
                  }
              }
          }
          Is it possible to include an example for defining the below config?

          !image-2018-10-15-08-55-49-311.png!

          Thanks
          New: 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?

          !image-2018-10-15-08-55-49-311.png!

          Thanks

          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.    
          Victor Martinez made changes -
          Component/s New: job-dsl-plugin [ 16720 ]
          Component/s Original: plugin-site [ 21221 ]
          Key Original: WEBSITE-526 New: JENKINS-54345
          Workflow Original: WEBSITE: Software Development Workflow [ 232105 ] New: JNJira + In-Review [ 232404 ]
          Project Original: Jenkins Website [ 10401 ] New: Jenkins [ 10172 ]
          Status Original: To Do [ 10003 ] New: Open [ 1 ]
          Daniel Spilker made changes -
          Issue Type Original: Task [ 3 ] New: Improvement [ 4 ]
          Daniel Spilker made changes -
          Link New: This issue is blocked by JENKINS-34173 [ JENKINS-34173 ]

          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: