Tell me, please, where to dig? - to make a "Windows PowerShell" build step with "Build a Visual Studio project or solution using MSBuild" in jenkins
Description: 1. In "Build a Visual Studio project or solution using MSBuild" the path to save the wsp package is used: / p: BasePackagePath = C: \ Jenkins \ Deployment \ Name \% BUILD_DATE% \ $ {GIT_COMMIT} \% BUILD_NUMBER% \
- To update the package, use the powershell script; for this, the path to the saved file is specified in the "Windows PowerShel" step: cd C: \ Jenkins \ Deployment_Updater C: \ Jenkins \ Deployment_Updater \ NoStopUpdate_v1.ps1 -p1 \ server_name \ C $ \ Jenkins \ Deployment \ Name \% BUILD_DATE% \ $ {GIT_COMMIT} \% BUILD_NUMBER% \
Problem: When the Jenkins build process comes to trying to use a wsp package, the attempt fails, because the "Windows PowerShel" build step does not see the full path (does not see the log - $ {GIT_COMMIT}): [OrgDocs] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C: \ Windows \ TEMP \ jenkins4836002707464403717.ps1" "Update Test Stand Path to wsp: \ server_name \ C $ \ Jenkins \ Deployment \ Name \% BUILD_DATE% \% BUILD_NUMBER% \ Get-ChildItem: Cannot find path '\ server_name \ C $ \ Jenkins \ Deployment \ Name \% BUILD_DATE% \ % BUILD_NUMBER% \ 'because it does not exist.
If you register, for example:
cd C: \ Jenkins \ Deployment_Updater C: \ Jenkins \ Deployment_Updater \ NoStopUpdate_v1.ps1 -p1 \ server_name \ C $ \ Jenkins \ Deployment \ Name \ wspfolder
then jenkins swallows the path and the wsp packages are installed on the server.