Gbru
Gbru

Reputation: 1087

Possible to pass a Jenkins Parameter (Variable) directly into a shell script?

Currently I have framework which is hosted in GitHub. Inside the framework (Maven) there is an shell .sch script which Jenkins will execute.

I know its possible to pass parameters from Jenkins (Via This project is parameterised option) but is there a way to pass run time parameters from Jenkins into an .SH script?

Upvotes: 1

Views: 54

Answers (1)

It should work just like passing any other value to a shell script.

sh '''

   yourscript.sh ${PARAM1} ${PARAM2} ${PARAM3}

'''

Upvotes: 2

Related Questions