如何将参数传递给Hudson Job的Shell命令 [英] How to pass parameters to Hudson job's shell commands

查看:91
本文介绍了如何将参数传递给Hudson Job的Shell命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Hudson职位,可以在远程服务器上执行shell脚本.

I have a Hudson job that execute shell script on a remote server.

它的shell命令是:

Its shell command is:

/usr/bin/deployWar.sh ${warfileName}

我将此构建标记为参数化,并添加了一个字符串参数:

I marked this build as parameterized, and added a string parameter:

name: warFileName
default value: none
description: name of war file

当我运行它时,会分配参数,但会将其传递到Shell脚本中.

When I run it, the parameter gets assigned, but it get passed into the shell script.

推荐答案

参数化的版本 Jenkins插件文档指出

Parameterized Build Jenkins plugin documentation states that

所有由参数添加的环境变量均为大写

在您的情况下,这应该可行:

In your case this should work:

/usr/bin/deployWar.sh ${WARFILENAME}

这篇关于如何将参数传递给Hudson Job的Shell命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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