-
Bug
-
Resolution: Unresolved
-
Major
-
None
Issue description
When running a multibranch pipeline (triggered by webhock) the job for the branch "Feature/BranchTest" is created but reported to be not found in the repository. See below log for more details.
[Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in E:\Jenkins\Data\workspace\COM_Licensing_Feature_BranchTest [Pipeline] { > C:\Program Files\Git\bin\git.exe rev-parse --resolve-git-dir E:\Jenkins\Data\caches\git-72cf2947f904b9e215fff0eea0c3bf93\.git # timeout=10 Setting origin to ssh://git@eu-muc-git01.ux.dsone.3ds.com:7999/sc_c/common.licensing.git > C:\Program Files\Git\bin\git.exe config remote.origin.url ssh://git@eu-muc-git01.ux.dsone.3ds.com:7999/sc_c/common.licensing.git # timeout=10 Fetching origin... Fetching upstream changes from origin > C:\Program Files\Git\bin\git.exe --version # timeout=10 > git --version # 'git version 2.43.0.windows.1' > C:\Program Files\Git\bin\git.exe config --get remote.origin.url # timeout=10 using GIT_SSH to set credentials BitBucket SSH connection with svc_3dexcite_iss01 Verifying host key using known hosts file, will automatically accept unseen keys > C:\Program Files\Git\bin\git.exe fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10 Seen branch in repository origin/develop Seen branch in repository origin/feature/BranchTest Seen branch in repository origin/feature/SCOM-1485-convert-to-netStandard-library Seen branch in repository origin/feature/testUnitTestCases Seen branch in repository origin/master Seen 5 remote branches [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: Could not determine exact tip revision of Feature/BranchTest Finished: FAILURE
Additional information
In the repository within Bitbucket the branch exists as shown in this screenshot.
Findings & other tests
Pipeline job works
When I setup a pipeline with the Jenkins file in the branch, the checkout works as expected.
> C:\Program Files\Git\bin\git.exe fetch --tags --force --progress -- ssh://git@eu-muc-git01.ux.dsone.3ds.com:7999/sc_c/common.licensing.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > C:\Program Files\Git\bin\git.exe config remote.origin.url ssh://git@eu-muc-git01.ux.dsone.3ds.com:7999/sc_c/common.licensing.git # timeout=10 > C:\Program Files\Git\bin\git.exe config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 Avoid second fetch > C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/Feature/BranchTest^{commit}" # timeout=10 > C:\Program Files\Git\bin\git.exe rev-parse "Feature/BranchTest^{commit}" # timeout=10 Checking out Revision b652a5eb0f768465c0c41074c5dd7f35c791c3c1 (refs/remotes/origin/Feature/BranchTest) > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10 > C:\Program Files\Git\bin\git.exe checkout -f b652a5eb0f768465c0c41074c5dd7f35c791c3c1 # timeout=10 Commit message: "test" First time build. Skipping changelog.
Checkout in script works
In addition, a checkout via checkout(resolveScm()) in the pipeline script also works.
Checking for first existing branch from [Feature/BranchTest, develop]... > C:\Program Files\Git\bin\git.exe rev-parse --resolve-git-dir E:\Jenkins\Data\caches\git-72cf2947f904b9e215fff0eea0c3bf93\.git # timeout=10 Setting origin to ssh://git@eu-muc-git01.ux.dsone.3ds.com:7999/sc_c/common.licensing.git > C:\Program Files\Git\bin\git.exe config remote.origin.url ssh://git@eu-muc-git01.ux.dsone.3ds.com:7999/sc_c/common.licensing.git # timeout=10 Fetching & pruning origin... Listing remote references... > C:\Program Files\Git\bin\git.exe config --get remote.origin.url # timeout=10 > C:\Program Files\Git\bin\git.exe --version # timeout=10 > git --version # 'git version 2.43.0.windows.1' using GIT_SSH to set credentials BitBucket SSH connection with svc_3dexcite_iss01 Verifying host key using known hosts file, will automatically accept unseen keys > C:\Program Files\Git\bin\git.exe ls-remote -h -- ssh://git@eu-muc-git01.ux.dsone.3ds.com:7999/sc_c/common.licensing.git # timeout=10 Fetching upstream changes from origin > C:\Program Files\Git\bin\git.exe config --get remote.origin.url # timeout=10 using GIT_SSH to set credentials BitBucket SSH connection with svc_3dexcite_iss01 Verifying host key using known hosts file, will automatically accept unseen keys > C:\Program Files\Git\bin\git.exe fetch --tags --force --progress --prune -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10 Checking branches... Checking branch Feature/BranchTest Met criteria Processed 1 branches (query complete) Found Feature/BranchTest at revision b652a5eb0f768465c0c41074c5dd7f35c791c3c1