diff --git a/nodebrady/azure-build-pipeline.yml b/nodebrady/azure-build-pipeline.yml index a5d94b2..a6afd34 100644 --- a/nodebrady/azure-build-pipeline.yml +++ b/nodebrady/azure-build-pipeline.yml @@ -18,16 +18,12 @@ variables: steps: -- bash: docker build -f $(system.defaultWorkingDirectory)/$(projectName)/Dockerfile -t $(registryServerName)/$(imageName):$(build.buildId) -t $(registryServerName)/$(imageName):latest $(system.defaultWorkingDirectory)/$(projectName) +- bash: docker build -f $(system.defaultWorkingDirectory)/$(projectName)/Dockerfile -t $(registryServerName)/$(imageName):$(build.buildId) $(system.defaultWorkingDirectory)/$(projectName) displayName: 'docker build' -- bash: docker login $(registryServerName) -u $(registryLogin) -p $(registryPassword) - displayName: 'docker login' - condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/master')) - - bash: | + docker login $(registryServerName) -u $(registryLogin) -p $(registryPassword) docker push $(registryServerName)/$(imageName):$(build.buildId) - docker push $(registryServerName)/$(imageName):latest displayName: 'docker push' condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/master'))