git-plugin icon indicating copy to clipboard operation
git-plugin copied to clipboard

[JENKINS-55884] Loading library fails with commit referenced by tag but not any branch

Open jenkins-infra-bot opened this issue 6 years ago • 1 comments

We have a library loaded dynamically in Pipeline script with 

library "mylib@​8c8a4a95f3187b82112cc2eb8539ba470c1eebff"

the sha1 in question is tagged on the remote, but not contained in any branch

Jenkins fails to load the library:

Loading library mylib@​8c8a4a95f3187b82112cc2eb8539ba470c1eebff
Attempting to resolve 8c8a4a95f3187b82112cc2eb8539ba470c1eebff from remote references...
> git --version # timeout=10
using GIT_SSH to set credentials Jenkins Account
> git ls-remote -h ssh://git@​our-bitbucket.com:7999/libProject/mylib.git # timeout=10
Could not find 8c8a4a95f3187b82112cc2eb8539ba470c1eebff in remote references. Pulling heads to local for deep search...
> git rev-parse --is-inside-work-tree # timeout=10
Setting origin to ssh://git@​our-bitbucket.com:7999/libProject/mylib.git
> git config remote.origin.url ssh://git@​our-bitbucket.com:7999/libProject/mylib.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
> git --version # timeout=10
> git config --get remote.origin.url # timeout=10
using GIT_SSH to set credentials Jenkins Account
> git fetch --tags --progress origin +refs/heads/:refs/remotes/origin/
> git rev-parse 8c8a4a95f3187b82112cc2eb8539ba470c1eebff^{commit} # timeout=10
> git branch -a -v --no-abbrev --contains 8c8a4a95f3187b82112cc2eb8539ba470c1eebff # timeout=10
Could not find a branch containing commit 8c8a4a95f3187b82112cc2eb8539ba470c1eebff
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
ERROR: No version 8c8a4a95f3187b82112cc2eb8539ba470c1eebff found for library mylib


Originally reported by phoenikz, imported from: Loading library fails with commit referenced by tag but not any branch
  • status: Open
  • priority: Major
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 4
  • imported: 2025-12-02
Raw content of original issue

We have a library loaded dynamically in Pipeline script with 

library "mylib@8c8a4a95f3187b82112cc2eb8539ba470c1eebff"

the sha1 in question is tagged on the remote, but not contained in any branch

Jenkins fails to load the library:

Loading library mylib@8c8a4a95f3187b82112cc2eb8539ba470c1eebff Attempting to resolve 8c8a4a95f3187b82112cc2eb8539ba470c1eebff from remote references... > git --version # timeout=10 using GIT_SSH to set credentials Jenkins Account > git ls-remote -h ssh://[email protected]:7999/libProject/mylib.git # timeout=10 Could not find 8c8a4a95f3187b82112cc2eb8539ba470c1eebff in remote references. Pulling heads to local for deep search... > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to ssh://[email protected]:7999/libProject/mylib.git > git config remote.origin.url ssh://[email protected]:7999/libProject/mylib.git # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 > git config --get remote.origin.url # timeout=10 using GIT_SSH to set credentials Jenkins Account > git fetch --tags --progress origin +refs/heads/:refs/remotes/origin/ > git rev-parse 8c8a4a95f3187b82112cc2eb8539ba470c1eebff^{commit} # timeout=10 > git branch -a -v --no-abbrev --contains 8c8a4a95f3187b82112cc2eb8539ba470c1eebff # timeout=10 Could not find a branch containing commit 8c8a4a95f3187b82112cc2eb8539ba470c1eebff [Bitbucket] Notifying commit build result [Bitbucket] Build result notified ERROR: No version 8c8a4a95f3187b82112cc2eb8539ba470c1eebff found for library mylib

environment
Jenkins 2.121.3 on RedHat Linux<br/>
Git plugin 3.9.2 <br/>
Git Client Plugin 2.7.6<br/>
Bitbucket Branch Source Plugin 2.4.0

jenkins-infra-bot avatar Jan 31 '19 07:01 jenkins-infra-bot

nfalco:
  • Original comment link
  • Raw content of original comment:

    Load library is configured in general section as git SCM repository, it does not depends on the bitbucket plugin, it use git plugin. Anyway since the issue is very old maybe the issue has been resolved

Load library is configured in general section as git SCM repository, it does not depends on the bitbucket plugin, it use git plugin.
Anyway since the issue is very old maybe the issue has been resolved

jenkins-infra-bot avatar Nov 08 '24 01:11 jenkins-infra-bot