trigger:
- master
resources:
- repo: self
variables:
dockerRegistryServiceConnection: '6a8843fd-7313-48e2-9381-3f9ef59ce82d' imageRepository: 'app1/app1nginx' containerRegistry: 'aksdevopsacr.azurecr.io' dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile' tag: '$(Build.BuildId)'
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository:
$(imageRepository) dockerfile: $ (dockerfilePath) containerRegistry:$(dockerRegistryServiceConnection) tags: | $ (tag)
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps: