From 9881b54fea553bffcf7216de25178f2e9090ad4c Mon Sep 17 00:00:00 2001 From: Dan Zhu Date: Tue, 17 Feb 2026 12:36:35 -0800 Subject: [PATCH 1/3] Add DR deployment and specify Release configuration --- pipelines/build-pipeline.yml | 2 +- pipelines/release-pipeline.yml | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/pipelines/build-pipeline.yml b/pipelines/build-pipeline.yml index 0b3556bf..ce0df822 100644 --- a/pipelines/build-pipeline.yml +++ b/pipelines/build-pipeline.yml @@ -61,7 +61,7 @@ extends: - script: | cd src/apisof.net dotnet clean - dotnet publish apisof.net.csproj -o "$(build.artifactstagingdirectory)/publish" /p:SourceRevisionId=$(Build.SourceVersion) + dotnet publish apisof.net.csproj -c Release -o "$(build.artifactstagingdirectory)/publish" /p:SourceRevisionId=$(Build.SourceVersion) displayName: "Publish Web Application" - task: ArchiveFiles@2 displayName: "Archive published files to site.zip" diff --git a/pipelines/release-pipeline.yml b/pipelines/release-pipeline.yml index f5e6f4e2..bfb9f3d4 100644 --- a/pipelines/release-pipeline.yml +++ b/pipelines/release-pipeline.yml @@ -46,9 +46,34 @@ extends: appType: webAppLinux package: $(Pipeline.Workspace)/apis-of-dotnet-drop/site.zip deploymentMethod: auto + - stage: DR + displayName: Deploy to DR + jobs: + - job: Job_1 + displayName: Run on agent + dependsOn: PreDeploymentApprovalJob + condition: succeeded() + timeoutInMinutes: 0 + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + pipeline: "apis-of-dotnet-build" + artifactName: "apis-of-dotnet-drop" + targetPath: "$(Pipeline.Workspace)/apis-of-dotnet-drop" + steps: + - task: AzureWebApp@1 + displayName: Deploy Web App + inputs: + azureSubscription: dotnetwebsite-azure + appName: apisofdotnet-dr + appType: webAppLinux + package: $(Pipeline.Workspace)/apis-of-dotnet-drop/site.zip + deploymentMethod: auto - stage: Production displayName: Deploy to Production - # dependsOn: DR + dependsOn: DR jobs: - job: PreDeploymentApprovalJob displayName: Pre-Deployment Approval From 121b651962632de02b99d9a1e0d1308e84355ec0 Mon Sep 17 00:00:00 2001 From: Dan Zhu Date: Tue, 17 Feb 2026 12:50:43 -0800 Subject: [PATCH 2/3] Update job dependencies on DR deployment --- pipelines/release-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/release-pipeline.yml b/pipelines/release-pipeline.yml index bfb9f3d4..61557e8c 100644 --- a/pipelines/release-pipeline.yml +++ b/pipelines/release-pipeline.yml @@ -48,10 +48,10 @@ extends: deploymentMethod: auto - stage: DR displayName: Deploy to DR + dependsOn: Dev jobs: - job: Job_1 displayName: Run on agent - dependsOn: PreDeploymentApprovalJob condition: succeeded() timeoutInMinutes: 0 templateContext: From 6b2c8a0223a3ed716abbcf00bf38bacb9715a35a Mon Sep 17 00:00:00 2001 From: Dan Zhu Date: Tue, 17 Feb 2026 13:32:31 -0800 Subject: [PATCH 3/3] Update azure service connection --- pipelines/release-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/release-pipeline.yml b/pipelines/release-pipeline.yml index 61557e8c..366ed9f4 100644 --- a/pipelines/release-pipeline.yml +++ b/pipelines/release-pipeline.yml @@ -66,7 +66,7 @@ extends: - task: AzureWebApp@1 displayName: Deploy Web App inputs: - azureSubscription: dotnetwebsite-azure + azureSubscription: ProductionLegacy appName: apisofdotnet-dr appType: webAppLinux package: $(Pipeline.Workspace)/apis-of-dotnet-drop/site.zip @@ -106,7 +106,7 @@ extends: - task: AzureWebApp@1 displayName: Deploy Web App inputs: - azureSubscription: dotnetwebsite-azure + azureSubscription: ProductionLegacy appName: apisofdotnet appType: webAppLinux package: $(Pipeline.Workspace)/apis-of-dotnet-drop/site.zip