Last active
March 18, 2020 14:07
-
-
Save michalpenka/b11d1333f82ec4d45cab6de3a0b69616 to your computer and use it in GitHub Desktop.
Azure DevOps build pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker | |
# Build a Docker image | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker | |
trigger: | |
- master | |
resources: | |
- repo: self | |
variables: | |
tagBuild: '$(Build.BuildId)' | |
stages: | |
- stage: Build | |
displayName: Build image | |
jobs: | |
- job: Build | |
displayName: Build | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- task: Docker@2 | |
displayName: Build and push the image | |
inputs: | |
containerRegistry: 'Docker Hub' | |
repository: 'YOUR_DOCKERHUBID/YOUR_DOCKERHUBREPONAME' | |
command: buildAndPush | |
dockerfile: '$(Build.SourcesDirectory)/Dockerfile' | |
tags: | | |
$(tagBuild) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment