You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何检测Jenkins是否因Git标签推送触发了作业?

Jenkins CI/CD 配置及标签触发构建日志

我目前正在基于Jenkins搭建完整的CI/CD流程,已经给对应的Git仓库配置了Jenkins钩子,现在每次推送代码(包括标签推送操作)都会自动触发新的构建任务。

下面是一次由标签推送触发的构建输出日志:

commit notification 282aa9df9bc037df26f82d0aaf7d65e57b3c6c00
Building in workspace /var/jenkins_home/workspace/testproject
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url ssh://GIT-HOST/PRJ/REPO.git # timeout=10
Cleaning workspace ...

内容的提问来源于stack exchange,提问作者wst

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:29:58