Skip to content

Commit

Permalink
ci(Docker): Tag images with Git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Mar 23, 2020
1 parent 8211723 commit 1235811
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
pool:
vmImage: ubuntu-latest
steps:
- script: VERSION_TAG=`git describe --tags --abbrev=0 | cut -c2-` && echo "##vso[task.setvariable variable=VERSION_TAG]$VERSION_TAG"
displayName: Set the Git tag as a build variable

- task: Docker@2
displayName: Build director image
inputs:
Expand All @@ -70,5 +73,17 @@ jobs:
containerRegistry: DockerHub
repository: stencila/hub-director
tags: |
$(Build.BuildNumber)
$(VERSION_TAG)
latest
- task: Docker@2
displayName: Build router image
inputs:
command: buildAndPush
dockerfile: router/Dockerfile
containerRegistry: DockerHub
repository: stencila/hub-router
tags: |
$(VERSION_TAG)
latest

0 comments on commit 1235811

Please sign in to comment.