jenkinsci / jenkinsci/gitlab-branch-source-plugin

configure using groovy

Open
#275 1 comment 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Java
Stars
134
Forks
113
PR merge metrics
No merged PRs in 30d

Description

### Describe your use-case which is not covered by existing documentation.

Hello, can someone tell me how to configure this feature using groovy file?

branchSources {
branchSource {
source {
gitlab {
// Select the GitLab Server where you want the projects to be discovered from.
serverName('default')
// Specify the namespace which owns your projects.
projectOwner('gitlab-group')
// Select the project on which you want to perform the Multibranch Pipeline Job.
projectPath('gitlab_group/REPO_NAME')
// Checkout credentials is only needed for private projects.
credentialsId('gitlab')
id('gitlab_group/REPO_NAME')
//projectId(long value). ----> what is this value for?????
traits {
// gitLabBranchDiscovery{
// strategyId(1)
// }
}
}
}
}
}

I'm currently using the feature through jenkins ui but i could'nt configure it using jenkins groovy.

### Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.