mslavs
mslavs

Reputation: 33

jenkins passing in path to python argument as variable

in jenkins i have :

  sh 'ls ${workspace}'
  sh 'cd MVD/utils && python compareWhitelist.py ${workspace}/MVDZOS'

I want to pass the complete path into the python script because I am doing

os.walk(sys.argv[1])

in the python script, I am also printing out the sys.argv[1] but it is returning only "/MVDZOS". How can I get the complete path into the script?

Upvotes: 0

Views: 1126

Answers (1)

Rakesh
Rakesh

Reputation: 82765

Try using the Uppercase in quotes.

Ex:

sh 'ls ${workspace}'
sh "cd MVD/utils && python compareWhitelist.py ${WORKSPACE}/MVDZOS"

Upvotes: 1

Related Questions