Skip to content

configure using groovy #275

Open
Open
@apallares19

Description

@apallares19

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions