forked from liupeirong/MLOpsManufacturing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
00-build-agent-pipeline.yml
49 lines (43 loc) · 1.23 KB
/
00-build-agent-pipeline.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
40
41
42
43
44
45
46
47
48
49
# Pipeline that builds and pushes the build-agent image.
parameters:
- name: workingDirectory
displayName: Working Directory for sample
type: string
default: samples/non-python-preprocess
resources:
- repo: self
pool:
vmImage: 'ubuntu-latest'
pr:
branches:
include:
- main
paths:
include:
- samples/non-python-preprocess/devops_pipelines/build_agent/Dockerfile
- samples/non-python-preprocess/local_development/dev_dependencies.yml
trigger:
branches:
include:
- main
paths:
include:
- samples/non-python-preprocess/devops_pipelines/build_agent/Dockerfile
- samples/non-python-preprocess/local_development/dev_dependencies.yml
variables:
- name: containerRegistry
value: mlopsmanufacturingacr
- name: imageName
value: mlopsmanufacturing/build-agent/nonpython
steps:
- task: Docker@2
displayName: Build and Push
inputs:
command: buildAndPush
containerRegistry: '$(containerRegistry)'
repository: '$(imageName)'
tags: |
${{format('build-{0}', '$(Build.BuildNumber)')}}
latest
buildContext: '${{ parameters.workingDirectory }}'
dockerFile: '${{ parameters.workingDirectory }}/devops_pipelines/build_agent/Dockerfile'