Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69181

JobDSL API viewer unaware of properties/folderConfig for multibranchPipelineJob

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Jenkins 2.346.2 standard docker image on Ubuntu 20.04, Job DSL plugin 1.81, Docker Pipeline plugin 1.29

      multibranchPipelineJob has a Properties section with the following fields:

      • Docker Label
      • Docker registry URL
      • Registry credentials

      I could not find anything relevant in the Job DSL API viewer on my Jenkins install. I looked at the config.xml and tried something, and it worked! Which means the API viewer is missing that information. Following is working for me and configuring those fields.

      multibranchPipelineJob('Foo-Build') {
          properties {
              folderConfig {
                  dockerLabel('Foo-Build-Docker')
                  registry {
                      url('https://harbor/')
                      credentialsId(null)
                  }
              }
          }
      }
      

      Please document folderConfig under properties.

          [JENKINS-69181] JobDSL API viewer unaware of properties/folderConfig for multibranchPipelineJob

          Pavel Roskin created issue -
          Pavel Roskin made changes -
          Description Original: multibranchPipelineJob has a Properties section with the following fields:
           * Docker Label
           * Docker registry URL
           * Registry credentials

          I could not find anything relevant in the Job DSL API viewer on my Jenkins install. I looked at the config.xml and tried something, and it worked! Which means the API viewer is missing that information. Following is working for me and configuring those fields.

          multibranchPipelineJob('Foo-Build') {
            properties {
              folderConfig {
                dockerLabel('Foo-Build-Docker')
                registry {
                  url('[https://harbor/')]
                  credentialsId(null)
                }
              }
            }
          }

          Please document folderConfig under properties.
          New: multibranchPipelineJob has a Properties section with the following fields:
           * Docker Label
           * Docker registry URL
           * Registry credentials

          I could not find anything relevant in the Job DSL API viewer on my Jenkins install. I looked at the config.xml and tried something, and it worked! Which means the API viewer is missing that information. Following is working for me and configuring those fields.

          {code:java}
          multibranchPipelineJob('Foo-Build') {
              properties {
                  folderConfig {
                      dockerLabel('Foo-Build-Docker')
                      registry {
                          url('https://harbor/')
                          credentialsId(null)
                      }
                  }
              }
          }
          {code}

          Please document folderConfig under properties.
          Pavel Roskin made changes -
          Environment Original: Jenkins 2.346.2 standard docker image on Ubuntu 20.04
          Job DSL plugin 1.81
          Plugins (without dependencies), all up to date:
            "cloudbees-bitbucket-branch-source",
            "cobertura",
            "configuration-as-code",
            "crowd2",
            "docker-workflow",
            "email-ext",
            "job-dsl",
            "lockable-resources",
            "pipeline-stage-view",
            "ssh-slaves",
            "timestamper"
          New: Jenkins 2.346.2 standard docker image on Ubuntu 20.04, Job DSL plugin 1.81, Docker Pipeline plugin 1.29

            jamietanna Jamie Tanna
            proski Pavel Roskin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: