检索存储库URL字段Jenkins [英] Retrieve Repository URL field Jenkins

查看:54
本文介绍了检索存储库URL字段Jenkins的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过代码调用GUI字段存储库URL",以便在我的Jenkins管道上使用其值?

is there a way to call via code the GUI field "Repository URL" in order to use its value on my Jenkins pipeline?

推荐答案

您可以使用jenkins的 GIT_URL 环境变量.即echo"Git URL is $ {GIT_URL}"这将为您提供当前jenkins作业中使用的git url.

You can use GIT_URL environment variable of jenkins. i.e. echo "Git URL is ${GIT_URL}" This will give you the git url used in the current jenkins job.

这篇关于检索存储库URL字段Jenkins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆