参数化 Hudson 构建问题
我有一个脚本,我可以使用执行 shell 运行它,如果我禁用警告消息,则可以通过给出参数 1 和参数 2 来运行它。开始参数化构建。如果我说是,它应该继续,如果我说不,它应该停止。任何想法将不胜感激。 谢谢 普拉文
I have a script and I can run it using execute shell and run as even parametrized by giving argument1 and argument 2 if I disable my warning message.My warning message do you want run yes/no but how we can give yes or no once we start the parametrized build. If I say yes it should continue if I say no it should stop.Any idea would be appreciated.
Thanks
Pravin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的脚本是交互式的,它将无法工作,因为 Hudson 需要非交互式脚本 - 否则它将挂起(没有终端)。
您可以做的是,不要询问是否继续,而是使其依赖于一个变量,比如说 CHOICE,因此
将 CHOICE 作为选择样式参数放入 Hudson 中。下次您开始构建时,它会问您“是”或“否”。您还可以选择自动构建的默认值。
If your script is interactive, it will not work, since Hudson requires non-interactive scripts - otherwise it will just hang (there is no terminal).
What you can do is, instead of asking whether to continue, make it dependent on a variable, let's say CHOICE, so
and put CHOICE as a choice-style parameter in Hudson. The next time you start the build, it will ask you "yes" or "no". You can also pick a default for automated builds.
最好使用一些 Hudson 变量来指示您处于 Hudson 构建中(HUDSON_JOB_ID?)等。这可以用于更改构建的行为。我看到了用于构建的交互式脚本的问题。构建脚本必须在不与用户交互的情况下运行。
It might be better to use some of the Hudson variables to indicate you are in a Hudson build (HUDSON_JOB_ID?) etc. This can be used to change the behavior of the build. I see the problem in having an interactive script for building. A build script must be running without interactions with the user.