update azure-pipelines.yml

This commit is contained in:
13xforever 2019-09-20 02:39:03 +05:00
parent 1ff4855af7
commit 02cd750994

View File

@ -24,7 +24,7 @@ jobs:
- job: DockerImage
displayName: 'Build Docker image'
condition: and(and(succeeded(), eq(variables['ReleaseBranch'], variables['Build.SourceBranch'])), ne(format('{0}', variables['DockerConnection']), ''))
condition: and(succeeded(), eq(variables['ReleaseBranch'], variables['Build.SourceBranch']))
dependsOn: BuildAndTest
pool:
vmImage: 'ubuntu-latest'
@ -50,11 +50,17 @@ jobs:
- script: mkdir packages && cp -a /home/vsts/.nuget/packages ./packages/
displayName: 'copy nuget package cache for docker'
- task: Docker@2
displayName: 'logging into docker registry'
condition: succeeded()
inputs:
containerRegistry: $(DockerConnection)
command: 'login'
- task: Docker@2
displayName: 'building release docker image'
condition: and(succeeded(), eq(variables['ReleaseKind'], 'release'))
inputs:
containerRegistry: $(DockerConnection)
repository: $(DockerRegistry)
command: 'buildAndPush'
Dockerfile: 'Dockerfile'
@ -67,7 +73,6 @@ jobs:
displayName: 'building test docker image'
condition: and(succeeded(), not(eq(variables['ReleaseKind'], 'release')))
inputs:
containerRegistry: $(DockerConnection)
repository: $(DockerRegistry)
command: 'buildAndPush'
Dockerfile: 'Dockerfile'