Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass parameters to Hudson job's shell commands

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

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

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

like image 699
Chun ping Wang Avatar asked Jul 18 '14 15:07

Chun ping Wang


1 Answers

Parameterized Build Jenkins plugin documentation states that

all the environment variables added by parameters are in upper case

In your case this should work:

/usr/bin/deployWar.sh ${WARFILENAME}
like image 127
Perspectivus Avatar answered Nov 03 '22 09:11

Perspectivus