Skip to content

Commit

Permalink
Add creating and saving Docker images into drop
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
ktos committed Oct 25, 2019
1 parent f68d56a commit fcc0502
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions azure-pipelines-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,31 @@ steps:
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Eleia-$(GitVersion.SemVer)-linux.zip'
ArtifactName: 'drop'
publishLocation: 'Container'

- script: rm -rf $(Build.BinariesDirectory)/*
displayName: Clean Binaries Directory

- task: Docker@2
displayName: 'Build Docker Image'
inputs:
containerRegistry: 'dcr.ktos.dev Docker Registry'
repository: eleia
command: build
Dockerfile: Dockerfile
buildContext: $(Build.BinariesDirectory)
tags: |
$(GitVersion.SemVer)
latest
- script: |
docker save eleia:latest -o $(Build.ArtifactStagingDirectory)/eleia-docker-$(GitVersion.SemVer).tar
gzip $(Build.ArtifactStagingDirectory)/eleia-docker-$(GitVersion.SemVer).tar
displayName: 'Saving Docker Image'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/eleia-docker-$(GitVersion.SemVer).tar.gz'
ArtifactName: 'drop'
publishLocation: 'Container'

0 comments on commit fcc0502

Please sign in to comment.