Im working on a simple deployment pipeline with azure devops. I created a deployment pipeline running on a self hosted ubuntu deployment group. The pipeline looks like this:
- Download artifacts from CI pipeline (created with dotnet publish)
- Stop running deployment
- Unzip the ASP.NET Core Web API to the deployment directory
- Run new deployment with
dotnet MyApp.dll
The first two steps work as expected. However, when the dotnet My App.dll
command is run, the process runs for 10 seconds with following "error" message being printed at the end:
The STDIO streams did not close within 10 seconds of the exit event from process '/usr/bin/bash'. This may indicate a child process inherited the STDIO streams and has not yet exited.
The deployment task is successful despite the message and the app not running. I tried to work around this feature by using nohup &
and relocating the command output. After some research I found that all processes started by a pipeline agent are stopped after the agent's work is done - meaning this behaviour is intended and my understanding of azure deployments/agents is wrong.
How do I deploy and run my app in an automated way on my own ubuntu machine using azure devops pipelines?
dotnet MyApp.dll
directly on the self hosted agent? stackoverflow.com/questions/59053614/… – Leo Liu-MSFTProcess.clean
variable tofalse
but its kinda dirty and certainly not what the developers intended. – Matthias LassnigProcess.clean
variable tofalse
is the solution to stop agent to clean up the processes. You could check the similar thread developercommunity.visualstudio.com/t/… – Leo Liu-MSFT