Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
fix(pipelines): use global image tag so deploy job also has value
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-ng committed Oct 19, 2019
1 parent ad444c3 commit 4fa42bc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ trigger:
variables:
repository: $(registry-host)/$(registry-namespace)
imageName: $(repository)/$(app-name)
imageTag: $(Build.BuildId)-$(Build.SourceVersion)

stages:
- stage: Tests
Expand Down Expand Up @@ -44,11 +45,6 @@ stages:
displayName: Build and Push Image
steps:

- script: |
echo '##vso[task.setvariable variable=imageTag]'$(Build.BuildId)-$(git rev-parse --short HEAD)''
echo 'imageTag set to $(imageTag)'
displayName: Set image tag with git sha
- script: docker build --tag $(imageName):$(imageTag) .
displayName: 'Docker: Build and tag image'

Expand Down

0 comments on commit 4fa42bc

Please sign in to comment.