首页 > 解决方案 > 如何使用 Jenkins 轮询 scm 以获取发布标签

问题描述

我需要帮助来使用 Jenkins 轮询 scm 以获取发布标签。Webhook 触发器不起作用,因为 Jenkins 位于防火墙后面。 如果在 Jenkins 的“源代码管理”选项卡下配置了以下release/release内容,则必须触发 Jenkins 构建。https://github.com/<user>/<repo>/releasesGit -> 在 Repositories 下,给定 Repository URL 和 Credentials。同样在“Refspec”的“高级”下将值配置为: +refs/tags/*:refs/remotes/origin/tags/*

也用于构建分支 -> /tags/

将 SCM 轮询配置为每 5 分钟运行一次。在“Git Polling Log”下,它每 5 分钟轮询一次,并根据标签带来发布细节。但是詹金斯的工作没有被触发。任何人都可以帮我解决这个问题吗?

来自 Git 轮询日志:

Started on 13 Oct, 2020 4:42:00 PM
Polling SCM changes on master
Using strategy: Default
[poll] Last Built Revision: Revision 2f3a23888bdce0b4ac63044c00f71adedc0aa175 (origin/tags/fb-bin1, origin/tags/15thRelease, origin/tags/9thRelease, origin/tags/17thRelease, origin/tags/14thRelease, origin/tags/11thRelease, origin/tags/20thRelease, origin/tags/8thRelease, origin/tags/13thRelease, origin/tags/10thRelease, origin/tags/21stRelease, origin/tags/19thRelease, origin/tags/12thRelease, origin/tags/16thRelease, refs/tags/fb-bin1, refs/tags/15thRelease, refs/tags/13thRelease, refs/tags/8thRelease, refs/tags/19thRelease, refs/tags/16thRelease, refs/tags/12thRelease, refs/tags/17thRelease, refs/tags/9thRelease, refs/tags/21stRelease, refs/tags/11thRelease, refs/tags/10thRelease, refs/tags/20thRelease, refs/tags/14thRelease)
using credential 7cbf657e-010a-40fd-ad76-0813e675c188
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repositories
 > git config remote.origin.url https://github.com/<user>/repo.git # timeout=10
Fetching upstream changes from https://github.com/<user>/repo.git
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress https://github.com/<user>/repo.git +refs/tags/*:refs/remotes/origin/tags/* # timeout=10
Polling for changes in
Seen branch in repository origin/bin
Seen branch in repository origin/master
Seen branch in repository origin/tags/10thRelease
Seen branch in repository origin/tags/11thRelease
Seen branch in repository origin/tags/12thRelease
Seen branch in repository origin/tags/13thRelease
Seen branch in repository origin/tags/14thRelease
Seen branch in repository origin/tags/15thRelease
Seen branch in repository origin/tags/16thRelease
Seen branch in repository origin/tags/17thRelease
Seen branch in repository origin/tags/19thRelease
Seen branch in repository origin/tags/20thRelease
Seen branch in repository origin/tags/21stRelease
Seen branch in repository origin/tags/22ndRelease
Seen branch in repository origin/tags/23rdRelease
Seen branch in repository origin/tags/24thRelease
Seen branch in repository origin/tags/2ndLatest
Seen branch in repository origin/tags/3rdRelease
Seen branch in repository origin/tags/4thRelease
Seen branch in repository origin/tags/5thRelease
Seen branch in repository origin/tags/6thRelease
Seen branch in repository origin/tags/7thRelease
Seen branch in repository origin/tags/8thRelease
Seen branch in repository origin/tags/9thRelease
Seen branch in repository origin/tags/Latest
Seen branch in repository origin/tags/fb-bin1
Seen 26 remote branches
 > git show-ref --tags -d # timeout=10
Done. Took 1.6 sec
No changes

提前致谢!

标签: jenkinsgithub

解决方案


推荐阅读