forked from microsoft/MLOps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
63 lines (53 loc) · 1.85 KB
/
azure-pipelines.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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
inputs:
versionSpec: 3.6
- script: |
pip install flake8
pip install flake8_formatter_junit_xml
flake8 --format junit-xml --output-file $(Build.BinariesDirectory)/flake8_report.xml --exit-zero --ignore E111
displayName: 'Check code quality'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '$(Build.BinariesDirectory)/*_report.xml'
testRunTitle: 'Publish test results'
- task: AzureCLI@1
inputs:
azureSubscription: 'build-demo'
scriptLocation: 'inlineScript'
inlineScript: 'az extension add -n azure-cli-ml'
workingDirectory: 'model-training'
- task: AzureCLI@1
inputs:
azureSubscription: 'build-demo'
scriptLocation: 'inlineScript'
inlineScript: 'az ml folder attach -w build-2019-demo -g scottgu-all-hands'
workingDirectory: ''
- task: AzureCLI@1
inputs:
azureSubscription: 'build-demo'
scriptLocation: 'inlineScript'
inlineScript: 'az ml run submit-script -c sklearn -e test -d training-env.yml train-sklearn.py'
workingDirectory: 'model-training'
- task: AzureCLI@1
inputs:
azureSubscription: 'build-demo'
scriptLocation: 'inlineScript'
inlineScript: 'az ml model register -n mymodel -p sklearn_regression_model.pkl -t model.json'
workingDirectory: 'model-deployment'
- task: AzureCLI@1
inputs:
azureSubscription: 'build-demo'
scriptLocation: 'inlineScript'
inlineScript: 'az ml model deploy -n acicicd -f model.json --ic inferenceConfig.yml --dc aciDeploymentConfig.yml --overwrite'
workingDirectory: 'model-deployment'