I have a powershell script in my Github. i am trying to execute that via Jenkins. Here is a part of the script :-
param (
+ [string]$fileDir = "%WORKSPACE%\src\Project\***",
[string]$packagingDir = "%WORKSPACE%\src\packageTemp",
[string]$staticFilesToDeploy = "%WORKSPACE%\src\****"
)
Now i am using a simple batch execution within Jenkins Job to run this script. I am trying to run it as
powershell -noexit "& ""%WORKSPACE%\src\***.ps1"""
But when Jenkins actually executes this powershell script its unable to replace %workspace% within the script and fails as it cannot find that. How do i make jenkins to replace that within the script when it executes it actually
%WORKSPACE%rather be $WORKSPACE? The%characters are used in Windows batch commands.