Hi all,

I am trying to configure GitLab Branch Source Plugin organizational folder 
using Job DSL. But unfortunately job dsl api viewer doesn't detect Fork 
Merge Request Trait 
<https://github.com/jenkinsci/gitlab-branch-source-plugin/blob/develop/src/main/java/io/jenkins/plugins/gitlabbranchsource/ForkMergeRequestDiscoveryTrait.java>.
 
All the detected traits in Job dsl api viewer takes either 
int/boolean/string values. But in Fork Merge Request Trait the trust field 
takes an SCMHeadAuthority object. How does one configure Job DSL with fork 
`change request` trait for any of the branch source plugin?

Can someone help me with figuring out what is wrong here. I have the 
following cases:

1. Job DSL doesn't support Fork Merge Request Trait.

2. There is something wrong with the impl of Fork Merge Request Trait.

3. Our Job DSL configuration is incorrect (note unable to configure fork 
merge request in this configuration):

organizationFolder(name) {
      organizations {
        displayName(config.displayName)
        description(orgDescription)
        gitLabSCMNavigator {
          projectOwner(config.group)
          credentialsId('gitlab_ssh_key')
          serverName('git.3shape.local')
          traits {
            subGroupProjectDiscoveryTrait() // discover projects inside 
subgroups
            gitLabBranchDiscovery {
              strategyId(3) // discover all branches
            }
            originMergeRequestDiscoveryTrait {
              strategyId(1) // discover MRs and merge them with target 
branch
            }
            gitLabTagDiscovery() // discover tags
            gitLFSPullTrait()
          }
        }
      }
      orphanedItemStrategy {
        discardOldItems {
          daysToKeep(7)
          numToKeep(10)
        }
      }
      if (!isSandbox()) {
        triggers {
          periodicFolderTrigger {
            interval('1d')
          }
        }
      }
      projectFactories {
        workflowMultiBranchProjectFactory {
          scriptPath('Jenkinsfile')
        }
      }
    }

4. or something else?

Thanks and Regards,
Parichay

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/ba6639f7-a735-4e2f-9e69-61f58762d7fa%40googlegroups.com.

Reply via email to