-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 2.346.1
Bitbucket Server Integration 3.2.2
-
-
3.2.3
The Bitbucket mirror is being ignored by Bitbucket multibranch Pipelines. Jenkins is continuing to poll and build from the main URI
Noting that this issue has been fixed for standard non-multibranch pipelines in the 3.2.2 release of the plugins. We created a new job from scratch with the latest LTS and plugins.
config.xml extract:
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api@2.1046.v0ca_37783ecc5">
<data>
<jenkins.branch.BranchSource>
<source class="com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource" plugin="atlassian-bitbucket-server-integration@3.2.2">
<id>2ee9282e-be68-4363-a4a2-9e9b98c03800</id>
<traits>
<jenkins.plugins.git.traits.BranchDiscoveryTrait plugin="git@4.11.3"/>
</traits>
<gitSCMSource>
<id>2ee9282e-be68-4363-a4a2-9e9b98c03800-git-scm</id>
<remote>ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git</remote>
<credentialsId>e01949841-ssh-uat-bitbucket</credentialsId>
<traits>
<jenkins.plugins.git.traits.BranchDiscoveryTrait reference="../../../traits/jenkins.plugins.git.traits.BranchDiscoveryTrait"/>
</traits>
<repository>
<credentialsId>Mark-March-2022</credentialsId>
<mirrorName>Bitbucket UAT CI Mirror</mirrorName>
<projectKey>JEN</projectKey>
<projectName>Jenkins</projectName>
<repositoryName>blue</repositoryName>
<repositorySlug>blue</repositorySlug>
<serverId>aa5d6d2e-da12-4571-9f5b-508b8ad45ee7</serverId>
<sshCredentialsId>e01949841-ssh-uat-bitbucket</sshCredentialsId>
</repository>
</gitSCMSource>
Logs showing job is cloning from the main URI: ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git (Bitbucket UAT CI Mirror)
instead of from the mirror URI: ssh://git@bitbucket-cimirror-amazon-uat.redacted.redacted:7999/jen/blue.git
Job Logs:
11:59:44 Branch indexing
11:59:45 > git rev-parse --resolve-git-dir /apps/external/4/jenkins-oss/caches/git-fa994c37409865450333b0da6a921a60/.git # timeout=10
11:59:45 Setting origin to ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git
11:59:45 > git config remote.origin.url ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git # timeout=10
11:59:45 Fetching & pruning origin...
11:59:45 Listing remote references...
11:59:45 > git config --get remote.origin.url # timeout=10
11:59:45 > git --version # timeout=10
11:59:45 > git --version # 'git version 2.35.1'
11:59:45 using GIT_SSH to set credentials pvtkey-ssh-uat-bitbucket
11:59:45 [INFO] Currently running in a labeled security context
11:59:45 [INFO] Currently SELinux is 'enforcing' on the host
11:59:45 > /usr/bin/chcon --type=ssh_home_t /apps/external/4/jenkins-oss/caches/git-fa994c37409865450333b0da6a921a60@tmp/jenkins-gitclient-ssh7050286843963204523.key
11:59:45 > git ls-remote -h – ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git # timeout=10
11:59:45 Fetching upstream changes from origin
11:59:45 > git config --get remote.origin.url # timeout=10
11:59:45 using GIT_SSH to set credentials pvtkey-ssh-uat-bitbucket
11:59:45 [INFO] Currently running in a labeled security context
11:59:45 [INFO] Currently SELinux is 'enforcing' on the host
11:59:45 > /usr/bin/chcon --type=ssh_home_t /apps/external/4/jenkins-oss/caches/git-fa994c37409865450333b0da6a921a60@tmp/jenkins-gitclient-ssh1733022430033283000.key
11:59:45 > git fetch --tags --force --progress --prune – origin +refs/heads/:refs/remotes/origin/ # timeout=10
11:59:46 Checking branches...
11:59:46 Checking branch main
11:59:46 Met criteria
11:59:46 Processed 2 branches (query complete)
11:59:46 Obtained Jenkinsfile from e826e1754e765ea936fc467fade8f4ce71ad14a8
11:59:46 [Pipeline] Start of Pipeline
11:59:46 [Pipeline] node
11:59:46 Running on rhel7-aws-002212152 in /ci-agent/jenkins/workspace/et-Tests_Mirror-Multibranch_main
11:59:46 [Pipeline] {
11:59:46 [Pipeline] stage
11:59:46 [Pipeline] { (Declarative: Checkout SCM)
11:59:46 [Pipeline] checkout
11:59:46 Selected Git installation does not exist. Using Default
11:59:46 The recommended git tool is: NONE
11:59:46 using credential pvtkey-ssh-uat-bitbucket
11:59:46 Cloning the remote Git repository
11:59:46 Cloning with configured refspecs honoured and without tags
11:59:47 Avoid second fetch
11:59:47 Checking out Revision e826e1754e765ea936fc467fade8f4ce71ad14a8 (main)
11:59:47 Commit message: "Pull request #3: Two and two"
11:59:47 First time build. Skipping changelog.
11:59:46 Cloning repository ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git
11:59:46 > git init /ci-agent/jenkins/workspace/et-Tests_Mirror-Multibranch_main # timeout=10
11:59:46 Fetching upstream changes from ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git
11:59:46 > git --version # timeout=10
11:59:46 > git --version # 'git version 2.35.1'
11:59:46 using GIT_SSH to set credentials pvtkey-ssh-uat-bitbucket
11:59:46 [INFO] Currently running in a labeled security context
11:59:46 [INFO] Currently SELinux is 'enforcing' on the host
11:59:46 > /usr/bin/chcon --type=ssh_home_t /ci-agent/jenkins/workspace/et-Tests_Mirror-Multibranch_main@tmp/jenkins-gitclient-ssh1202093357893271336.key
11:59:46 > git fetch --no-tags --force --progress – ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git +refs/heads/:refs/remotes/origin/ # timeout=10
11:59:47 > git config remote.origin.url ssh://git@bitbucket-amazon-uat.redacted.redacted:7999/jen/blue.git # timeout=10
11:59:47 > git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
11:59:47 > git config core.sparsecheckout # timeout=10
11:59:47 > git checkout -f e826e1754e765ea936fc467fade8f4ce71ad14a8 # timeout=10
...