如何使用参数化构建插件将默认值传递给Jenkins构建? [英] How to pass default values to a Jenkins build using the Parameterized Build Plugin?

查看:140
本文介绍了如何使用参数化构建插件将默认值传递给Jenkins构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jenkins中的参数化构建插件.我想提供一个指向构建页面的链接,但是为表单中显示的字段之一配置默认值.每次运行作业时,此值都会有所不同,但我希望可以从其他页面进行配置.本质上,我想做一些事情,例如单击看起来像这样的链接:

I'm using the Parameterized Build Plugin in Jenkins. I want to provide a link to the build page, but configure the default value for one of the fields that shows up in the form. This value is going to be different every time the job is run, but I want it to be configurable from some other page. Essentially I want to do something like click on a link that looks something like this:

https://jenkins/job/Sandbox/build?delay=0sec&Test=foo

并在构建屏幕上看到它:

And see this on the build screen:

因此,我可以填写其余的值(甚至修改默认值),然后单击生成".这可能吗?

So then I can fill out the rest of the values (or even modify the default value) and then click Build. Is this possible?

推荐答案

是的,它绝对可行-有一个用于此的插件

Yes, it's absolutely doable - there is a plugin for that:

使用参数插件构建.

只需安装它并更改URL即可实际使用该插件:

Just install it and change the url to actually use the plugin:

https://jenkins/job/Sandbox/parambuild?Test=foo

那应该做...

这篇关于如何使用参数化构建插件将默认值传递给Jenkins构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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