first commit
This commit is contained in:
commit
2660f55733
1 changed files with 248 additions and 0 deletions
35
pipeline/azuredevops/pipeline-docker.yml
Normal file
35
pipeline/azuredevops/pipeline-docker.yml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
trigger:
|
||||
- main
|
||||
|
||||
resources:
|
||||
- repo: self
|
||||
|
||||
variables:
|
||||
# Container registry service connection established during pipeline creation
|
||||
dockerRegistryServiceConnection: 'da808316-c62a-445b-ae0c-3ad87fd75a60'
|
||||
imageRepository: 'javadocker'
|
||||
containerRegistry: 'taskjava.azurecr.io'
|
||||
dockerfilePath: '$(Build.SourcesDirectory)/app/Dockerfile'
|
||||
tag: '$(Build.BuildId)'
|
||||
|
||||
# Agent VM image name
|
||||
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)
|
||||
Loading…
Reference in a new issue