I have an Azure DevOps pipeline which I want to start a long running test. I only want to start it and not wait for the results. (test will for example be a performance test running over the weekend).
What I want to achieve is that when I RDP onto the VM with the azure pipeline agent running, I will see the scripts that I have started.
What I have: run-stresstest.ps1 which starts another long running powershell script (my-tool.ps1)
My yml file:
- task: CmdLine@2
displayName: 'Run stress tests'
inputs:
script: |
cd /d c:StressTest
set VSTS_PROCESS_LOOKUP_ID=
start powershell.exe c:StressTestrun-stresstest.ps1
My launcher ps1 script: run-stresstest.ps1
Start-Process PowerShell -ArgumentList "-noexit", "-File ./my-tool.ps1" | Out-Default
So what I am missing is to see the window in where the script my-tool.ps1 is running. I’d like to see the output and be able to interact with it if needed.
Now I don’t see anything, but I see that that my-tool.ps1 is running in the process manager.
I used the logic of Child process of an Azure DevOps task is killed when the job stops to prevent my scripts/processes to be killed automatically by devops after completing the task.
Environment:
- Selfhosted windows azure pipeline agent (running as user)