开发者

Jenkins / Hudson - Set delay time at build execution

开发者 https://www.devze.com 2023-03-05 16:02 出处:网络
It is possible to set the delay time 开发者_运维技巧when executing a jenkins build? Like when using p.ex:

It is possible to set the delay time 开发者_运维技巧when executing a jenkins build? Like when using p.ex:

http://host/jenkins/job/job_name/build?delay=100sec

But making it with a plugin. I dont know how to get this delay parameter and set it with another value.

Thanks a lot.


I think build parameters are stored as environment variables and if that's the case, then you should be able set them using some code like this:

build.getEnvironment(listener).put("delay", "250");

In your plugin, you would put this in the setUp method of a class that extends the BuildWrapper.

0

精彩评论

暂无评论...
验证码 换一张
取 消