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

buildStrategies are not set when using jobDSL,

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • branch-api-plugin
    • None

      Given this jobDSL definition:

      multibranchPipelineJob("${args.jobName}") {
        description("Multibranch job")
        branchSources{
          branchSource {
            source {
              github {
                id("${args.jobName}-gh-branches-1")
                scanCredentialsId("####")
                checkoutCredentialsId("####")
                repoOwner('####')
                repository("${args.repositoryName}")
      
                includes("main jira-*")
              }
            }
            buildStrategies {
              includeRegionBranchBuildStrategy {
                  includedRegions("${args.project}/**")
              }                      
            }
          }
        }
        factory {
          workflowBranchProjectFactory {
            scriptPath("${args.project}/Jenkinsfile")
          }
        }
      } 

      The generated jobs have no build strategy set:

      TheĀ multibranch-build-strategy-extension plugin is installed (same result using strategies from basic-branch-build-strategies plugin) and I can manually add the strategy.

            Unassigned Unassigned
            aitorpazos Aitor Pazos
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: