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

Dynamic DSL for workflowMultiBranchProjectFactory not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Job DSL 1.68
      Pipeline Multibranch 2.17

      When trying to configure the script path for a multibranchPipelineJob using the Dynamic DSL

      factory {
      	workflowMultiBranchProjectFactory {
      		scriptPath("test/Jenkinsfile")
      	}
        }
      

      The default script path of just "Jenkinsfile" is configured on the generated job.
      I was initially using the prescribed DSL for github branch source jobs and thought that might have been the problem, but when I moved the branch source configuration to the Dynamic DSL the problem persisted.

      multibranchPipelineJob('testing/scriptpath') {
        branchSources {
          branchSource {
            source {
              github {
                id("test")
                // Github Enterprise
                apiUri('https://*****/api/v3/')
                credentialsId('github_token')
                repoOwner("sfoster")
                repository("branch_filter_test")
              }
            }
          }
        }
        factory {
      	workflowMultiBranchProjectFactory {
      		scriptPath("test/Jenkinsfile")
      	}
        }
      }
      

            daspilker Daniel Spilker
            stevenfoster Steven Foster
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: