From 2724905487bdd7664eb35d4bbc9b84ad5ce3cd36 Mon Sep 17 00:00:00 2001 From: Premek Vysoky Date: Mon, 9 Dec 2024 16:41:15 +0100 Subject: [PATCH] Add an approval stage to the PCS pipeline --- ...-pipelines-product-construction-service.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-product-construction-service.yml b/azure-pipelines-product-construction-service.yml index 919def75d1..1b963904f4 100644 --- a/azure-pipelines-product-construction-service.yml +++ b/azure-pipelines-product-construction-service.yml @@ -154,10 +154,26 @@ stages: devBranchSuffix: $(devBranchSuffix) dockerImageName: $(dockerRegistryUrl)/$(containerName) -- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: +- ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}: + - stage: Approval + dependsOn: + - Build + jobs: + - deployment: approval + displayName: Deployment approval + ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/production') }}: + environment: Production + ${{ else }}: + environment: Staging + pool: server + strategy: + runOnce: + deploy: {} + - stage: DeployPCS dependsOn: - Build + - Approval displayName: Deploy Product Construction Service jobs: