jenkins pipeline script params not recognized, bad substitution error
237 views
Skip to first unread message
Justin Khoo
unread,
Jul 10, 2017, 5:46:17 PM7/10/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
how can I read in the params from jenkins script shell sh?
pipeline {
stages{
stage('Deploy') {
steps {
sh 'python deploy.py ${params.version}'
}
}
}
}
I have tried several ways, but still not able to read in params.
Kai
unread,
Jul 10, 2017, 5:54:41 PM7/10/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
I have a similar issue, I have a build job that is parameterized and am Not able to successfully use that parameter to pass as an argument to my python script in my pipeline stage
Jakub Pawlinski
unread,
Jul 11, 2017, 5:26:40 AM7/11/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
try using double quote:
sh "python deploy.py ${params.version}"
I think single quotes do not evaluate strings
Kai
unread,
Jul 14, 2017, 1:26:29 PM7/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message