forked from liupeirong/MLOpsManufacturing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
03-custom-process-data-os-cmd.yml
76 lines (68 loc) · 2.76 KB
/
03-custom-process-data-os-cmd.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Continuous Integration (CI) pipeline that orchestrates the training, evaluation, and registration of the model.
parameters:
- name: aml_pipeline_name
displayName: AML Pipeline Name to trigger
type: string
default: nonpython-data-processing-pipeline
- name: workingDirectory
displayName: Working Directory for sample
type: string
default: samples/non-python-preprocess
resources:
containers:
- container: mlops
image: mlopsmanufacturing/build-agent/nonpython:latest
endpoint: mlopsmanufacturingacr
pr: none
trigger:
branches:
include:
- main
paths:
include:
- samples/non-python-preprocess/ml_model/preprocess/Dockerfile
- samples/non-python-preprocess/ml_model/preprocess/preprocess_os_cmd_aml.py
- samples/non-python-preprocess/ml_service/pipelines/build_data_processing_os_cmd_pipeline.py
- samples/non-python-preprocess/devops_pipelines/03-custom-process-data-os-cmd.yml
- samples/non-python-preprocess/devops_pipelines/variables-template.yml
- samples/non-python-preprocess/devops_pipelines/code-quality-template.yml
- samples/non-python-preprocess/devops_pipelines/trigger-preprocessing-pipeline.yml
variables:
- template: variables-template.yml
- group: nonpython-preprocess-aml-vg
pool:
vmImage: ubuntu-latest
stages:
- stage: 'Data_CI'
displayName: 'Data code quality and publish preprocessing pipeline'
jobs:
- job: "Data_CI_Pipeline"
displayName: "Data CI Pipeline"
container: mlops
timeoutInMinutes: 0
steps:
- template: code-quality-template.yml
parameters:
workingDirectory: ${{ parameters.workingDirectory }}
- task: AzureCLI@1
enabled: true
inputs:
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)'
scriptLocation: inlineScript
workingDirectory: ${{ parameters.workingDirectory }}
inlineScript: |
set -e # fail on error
export SUBSCRIPTION_ID=$(az account show --query id -o tsv)
# Invoke the Python building and publishing a data preprocessing pipeline
python -m ml_service.pipelines.build_data_processing_os_cmd_pipeline
displayName: 'Publish Data Preprocessing OS cmd Pipeline'
# Trigger_Preprocessing_Pipeline
- template: trigger-preprocessing-pipeline.yml
parameters:
# Template parameters can not be expanded, hard coded here
aml_pipeline_name: ${{ parameters.aml_pipeline_name }}
workingDirectory: ${{ parameters.workingDirectory }}
# aml_pipeline_name: ${{ variable.PREPROCESSING_OS_CMD_PIPELINE_NAME }}
# aml_pipeline_name: $(PREPROCESSING_OS_CMD_PIPELINE_NAME)
# Variable expanding for Parameters is not always possible:
# https://developercommunity.visualstudio.com/content/problem/429990/azure-pipelines-passing-a-variable-as-a-parameter.html