我有一个 Jenkins Bitbucket 团队/项目工作。在我的存储库中的 Jenkinsfile 中,我使用“git describe”来获取当前标签。在我更新到最新的 Jenkins 版本 (2.60.3) 并更新了大多数插件后,这失败了,因为 Jenkins 不再获取标签。
这是我更新前的样子:
Branch event
Checking out git https://bitbucket.org/xxxxxxx to read Jenkinsfile
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://bitbucket.org/xxxxx.git # timeout=10
Fetching upstream changes from https://bitbucket.org/xxxx.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials Admin user to clone bitbucket repositories
> git fetch --tags --progress https://bitbucket.org/xxxxx.git +refs/heads/master
Run Code Online (Sandbox Code Playgroud)
这就是我现在所拥有的:
Branch event
Checking out git https://bitbucket.org/xxxx.git into /var/lib/jenkins/jobs/xxxx/jobs/xxx/branches/master/workspace@script …Run Code Online (Sandbox Code Playgroud) jenkins ×1