I'm building a process to automate deploys using Jenkins and I have an issue getting the code on the server
I have a powershell script on the deploy server that all it does is do an hg update command.
$ciPwd = ConvertTo-SecureString $env:CI_SERVER_PWD -AsPlainText -Force
$ciCredential = New-Object System.Management.Automation.PSCredential ($env:CI_SERVER_USR, $ciPwd)
Invoke-Command -ComputerName web1-dev,web2-dev -Credential $ciCredential -ScriptBlock { C:\hg\Update.ps1 } -InDisconnectedSession -SessionName srv1,srv2
Write-Host "web1-dev output:"
Receive-PSSession -Name srv1
Remove-PSSession -Name srv1
Write-Host "web2-dev output:"
Receive-PSSession -Name srv2
Remove-PSSession -Name srv2
the script always hangs at the 'web1-dev output:' portion.
I'm kinda new to powershell scripting so its possible I'm doing something wrong, and if there's a better way to call a remote powershell script, I'm open to that