diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index ce7fefc82..d6aa6199e 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -11,6 +11,7 @@ parameters: baseImageTag: baseImageTag # extraBuildOptions: '' buildArtifacts: '' + dependsOn: [] - name: buildSteps type: object default: @@ -76,7 +77,14 @@ jobs: displayName: Build ${{parameters.service.name}} dependsOn: - ImageBuild_${{parameters.service.name}} - condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped') + - ${{ each dep in parameters.service.dependsOn }}: + - ${{ dep }} + condition: | + and( + in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), + ${{ each dep in parameters.service.dependsOn }}: + eq(dependencies.${{dep}}.result, 'Succeeded') + ) container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 43f23ccc3..b2d3d1568 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,6 +24,7 @@ parameters: buildArtifacts: | .stack/ .stack-work/ + dependsOn: compile_frontend variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build