Dockerizing DevOps V2 - AzDO 컨테이너 작업
5963 단어 devopsdevcontainedocker
trigger: none
resources:
containers:
- container: devcontainer
image: $(imageRepository):$(Build.BuildId)
endpoint: demoacr
options: --name devcontainer
variables:
- name: dockerRegistryServiceConnection
value: "demoserviceconnection"
- name: imageRepository
value: "demoacr.azurecr.io/foo-devcontainer"
stages:
- stage: BUILD
displayName: Docker build & push
jobs:
- job:
displayName: Devcontainer build & push
steps:
- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: $(dockerRegistryServiceConnection)
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: ".devcontainer/Dockerfile"
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(Build.BuildId)
latest
- stage: TEST
displayName: Run tests and linters
dependsOn:
- BUILD
jobs:
- job: Tests
steps:
- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: $(dockerRegistryServiceConnection)
- script: |
make lint
displayName: "Lint"
target: devcontainer
- script: |
make test
displayName: "Run all tests"
target: devcontainer
Reference
이 문제에 관하여(Dockerizing DevOps V2 - AzDO 컨테이너 작업), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/eliises/dockerizing-devops-v2-azdo-container-jobs-3hbf텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)