From 492a7587233e7dc8a1005542abad51a312762cee Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 14:46:01 +0100 Subject: [PATCH] ci(azure-pipelines): only rebuild frontend image on master or update/... branches --- azure-pipelines.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ab8d3b0de..a8d96dc2d 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -7,9 +7,11 @@ pool: 'Prod Private Agent Pool' variables: imageFradriveUpstream: devfra.azurecr.io/de.fraport.fradrive.build onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] + onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] jobs: - job: FrontendImage + condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -48,7 +50,7 @@ jobs: docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - # condition: eq(variables.onMasterBranch, true) + condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | @@ -88,8 +90,8 @@ jobs: containerRegistry: devFra - job: FrontendBuild - dependsOn: FrontendImage - condition: succeeded() + # dependsOn: FrontendImage + # condition: succeeded() container: # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:latest