-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Minor
-
Component/s: git-plugin, job-dsl-plugin, workflow-multibranch-plugin
-
Environment:Jenkins: 2.60.2
workflow-multibranch-plugin: 1.16
git-plugin: 3.4.1
job-dsl-plugin: 1.64
In the past I used `gitSCMSource` to specify my git configuration with extensions in my Job DSL.
Â
Template I used:
multibranchPipelineJob('${JOB_NAME}') { Â Â displayName('${JOB_NAME}') Â Â description('${JOB_DESCRIPTION}') Â Â orphanedItemStrategy { Â Â Â Â discardOldItems { Â Â Â Â Â Â numToKeep(7) Â Â Â Â } Â Â } Â Â branchSources { Â Â Â Â branchSource { Â Â Â Â Â Â source { Â Â Â Â Â Â Â Â gitSCMSource { Â Â Â Â Â Â Â Â Â Â id('') Â Â Â Â Â Â Â Â Â Â remoteName('origin') Â Â Â Â Â Â Â Â Â Â rawRefSpecs('') Â Â Â Â Â Â Â Â Â Â ignoreOnPushNotifications(false) Â Â Â Â Â Â Â Â Â Â remote('${JOB_GIT_URL}') Â Â Â Â Â Â Â Â Â Â credentialsId('${GIT_CREDENTIALS_ID}') Â Â Â Â Â Â Â Â Â Â includes('*') Â Â Â Â Â Â Â Â Â Â excludes('') Â Â Â Â Â Â Â Â Â Â extensions { Â Â Â Â Â Â Â Â Â Â Â Â wipeWorkspace() Â Â Â Â Â Â Â Â Â Â Â Â preBuildMerge { Â Â Â Â Â Â Â Â Â Â Â Â Â Â options { Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mergeRemote('origin') Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mergeTarget('${GIT_BRANCH}') Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mergeStrategy('default') Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â fastForwardMode('FF') Â Â Â Â Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â Â } Â Â Â Â Â Â } Â Â Â Â } Â Â } }
Now after updating to latest Jenkins/Plugins this no longer works. I looked at using the `git` source instead of `gitSCMSource` but it does not provide a way to set the extensions.
In the new git-plugin 3.4.0 extensions are deprecated and are now traits. Not sure if this has anything to do with the issue.
- duplicates
-
JENKINS-45504 Add @Symbol annotations to traits
-
- Closed
-
- is related to
-
JENKINS-46202 Cannot discover all GitHub repos and their branches with Job DSL anymore
-
- Closed
-