abp icon indicating copy to clipboard operation
abp copied to clipboard

DbMigrator never ends in a continuous deployment job

Open Stirda opened this issue 6 years ago • 4 comments

When I ask my Azure DevOps release pipeline to run dotnet MyCompany.MyProject.DbMigrator.dll, the task never terminates, waiting indefinitely for a SIGTERM or Ctrl+C sequence to be sent.

I understand that this is the standard behavior of ConsoleLifetime but how can I run DbMigrator unattended?

Stirda avatar Apr 12 '20 17:04 Stirda

Thank you for creating the issue, I also was thinking about that.

hikalkan avatar Apr 12 '20 17:04 hikalkan

We can inject IHostApplicationLifetime into DbMigratorHostedService to manually request termination of the current application.

maliming avatar Apr 13 '20 06:04 maliming

@Stirda Off-topic: Would you mind sharing your yml file for the release pipeline? I am trying to get mine to work but I am confused about deploying the DbMigrator. What steps do you take? Do you first deploy the DbMigrator, execute the dotnet .dll and then deploy the website?

aklscv avatar Apr 22 '20 05:04 aklscv

@aklscv I suppose that the ABP team would prefer you create an issue for that. I will answer your question in.

Stirda avatar Apr 22 '20 09:04 Stirda