Created
March 11, 2019 18:00
-
-
Save acraven/72f53f2c0d90065fbc52b5b2e3663eb1 to your computer and use it in GitHub Desktop.
Beautiful azure-pipelines.yml
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
name: 1.0$(Rev:.r) | |
trigger: | |
batch: false | |
branches: | |
include: | |
- master | |
paths: | |
exclude: | |
- README.md | |
jobs: | |
- template: azure-pipelines.common.yml |
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
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) |
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
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