From a9a39bf962af2e0aeb14620747c3210871c05799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donatas=20Pu=C4=8Dinskas?= <70218616+DonatasPuc@users.noreply.github.com> Date: Tue, 7 Dec 2021 12:59:16 +0200 Subject: [PATCH] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5dae2f08..0efc0696 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,7 +16,16 @@ variables: steps: - task: NuGetToolInstaller@1 - +- task: DotNetCoreCLI@2 + inputs: + command: 'custom' + custom: 'new' + arguments: 'tool-manifest' +- task: DotNetCoreCLI@2 + inputs: + command: 'custom' + custom: 'tool' + arguments: 'install dotnet-ef' - task: NuGetCommand@2 inputs: restoreSolution: '$(solution)' @@ -32,5 +41,15 @@ steps: inputs: platform: '$(buildPlatform)' configuration: '$(buildConfiguration)' +- task: DotNetCoreCLI@2 + inputs: + command: 'custom' + custom: 'ef' + arguments: 'migrations script --output $(Build.SourcesDirectory)/SQL/wasteddbscript.sql --idempotent --project $(Build.SourcesDirectory)/src/Persistence.csproj --context DatabaseContext' +- task: PublishBuildArtifacts@1 -- task: PublishBuildArtifacts@1 \ No newline at end of file +- task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/SQL/tododbscript.sql' + ArtifactName: 'SQLScripts' + publishLocation: 'Container' \ No newline at end of file