ci(azure-pipelines): fix and deduplicate condition when to setup images
This commit is contained in:
parent
17c7ed89c5
commit
c62c435638
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user