Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins parameters with powershell

how to pass the jenkins string parameters to power shell script param value?

I have to pass the source path url to the powershell script param value. Given the Source path as string parameter in jenkins. I want to know how to pass the jenkins parameter value into powershell script param value.

like image 795
Meena Avatar asked May 10 '19 14:05

Meena


1 Answers

Every parameter in a job is available to PowerShell as an environment variable, so if your parameter is named i.e. SourcePath you can write it in PowerShell as ${env:SourcePath}

like image 73
towel Avatar answered Sep 22 '22 11:09

towel