-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAzureContainerRegistry-pipelines.yml
39 lines (35 loc) · 1.11 KB
/
AzureContainerRegistry-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Azure Container Registry
# Build and push an image to Azure Container Registry
trigger:
- master
resources:
- repo: self
variables:
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: DeployACR
displayName: ACR
jobs:
- job:
pool:
vmImage: $(vmImageName)
steps:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'heloworld'
subscriptionId: 'e10f0431-c516-4dcd-834e-4c4371da5220'
action: 'Create Or Update Resource Group'
resourceGroupName: 'Stage1'
location: 'East US'
templateLocation: 'Linked artifact'
csmFile: '$(Build.SourcesDirectory)/ACRtemplate.json'
csmParametersFile: '$(Build.SourcesDirectory)/ACRparameters.json'
deploymentMode: 'Incremental'
- task: AzurePowerShell@5
inputs:
azureSubscription: 'heloworld'
ScriptType: 'InlineScript'
Inline: 'Update-AzContainerRegistry -Name pythonacrapi -ResourceGroupName Stage1 -EnableAdminUser'
azurePowerShellVersion: 'LatestVersion'