diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index becc5ece5..1dfbb5be5 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -34,8 +34,7 @@ jobs: - job: SetupDependencies_${{parameters.serviceName}} displayName: Install ${{parameters.serviceName}} dependencies dependsOn: SetupImage_${{parameters.serviceName}} - condition: always() # TODO: only succeeded and skipped - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: + ${{ if eq(variables.setupImages, true) }}: condition: succeeded() ${{ else }}: condition: always() diff --git a/.azure-pipelines/templates/jobs/setup_image.yaml b/.azure-pipelines/templates/jobs/setup_image.yaml index a4351ce13..2028e2cc2 100644 --- a/.azure-pipelines/templates/jobs/setup_image.yaml +++ b/.azure-pipelines/templates/jobs/setup_image.yaml @@ -11,7 +11,7 @@ parameters: jobs: - job: SetupImage_${{parameters.imageName}} displayName: Build ${{parameters.imageName}} image - condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + condition: eq(variables.setupImages, true) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index f1f09ec60..e44679ac2 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -53,8 +53,7 @@ parameters: variables: buildImageUpstream: devfra.azurecr.io/de.fraport.fradrive.build - onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] - onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] + setupImages: $[ or( eq(variables.forcePushLatest, true), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/update'), startsWith(variables['Build.SourceBranch'], 'refs/tags/') ) ] pool: 'Prod Private Agent Pool'