Skip to content

Instantly share code, notes, and snippets.

@acraven
Created March 11, 2019 18:00
Show Gist options
  • Save acraven/72f53f2c0d90065fbc52b5b2e3663eb1 to your computer and use it in GitHub Desktop.
Save acraven/72f53f2c0d90065fbc52b5b2e3663eb1 to your computer and use it in GitHub Desktop.
Beautiful azure-pipelines.yml
name: 1.0$(Rev:.r)
trigger:
batch: false
branches:
include:
- master
paths:
exclude:
- README.md
jobs:
- template: azure-pipelines.common.yml
jobs:
- job: Package
pool:
vmImage: 'Ubuntu-16.04'
variables:
azureSubscriptionEndpoint: {SUBSCRIPTION}
azureContainerRegistry: {REGISTRY}
repositoryName: '$(azureContainerRegistry)/{SERVICE}'
version: '$(build.buildNumber)'
imageName: '$(repositoryName):$(version)'
steps:
- script: docker build --build-arg version=$(version) -t $(imageName) package
displayName: 'docker build'
- task: Docker@1
displayName: 'docker push'
inputs:
command: push
azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
azureContainerRegistry: $(azureContainerRegistry)
imageName: $(imageName)
name: 0.$(System.PullRequest.PullRequestId)$(Rev:.r)-pr
trigger:
batch: false
branches:
exclude:
- master
paths:
exclude:
- README.md
jobs:
- template: azure-pipelines.common.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment