This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
azure-pipelines.yml
111 lines (97 loc) · 3.89 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# BatchScoringDeepLearningModelsWithAML Pipeline
trigger:
batch: true
branches:
include:
- master
variables:
- group: AzureKeyVault
jobs:
- job: BatchScoringDeepLearningModelsWithAMLJob
timeoutInMinutes: 300
cancelTimeoutInMinutes: 2
pool:
vmImage: 'Ubuntu-16.04'
strategy:
maxParallel: 1
matrix: {"eastus": {"azureregion": "eastus", "azurergname" : "btscdlamleastus", "azurestorage" : "btscdlstgeast"},"southcentralus": {"azureregion": "southcentralus", "azurergname" : "btscdlamlsouthctrl" , "azurestorage" : "btscdlstgsthctrl"},"westus2": {"azureregion": "westus2", "azurergname" : "btscdlamlwestus" , "azurestorage" : "btscdlstgwest2"}}
steps:
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
which conda
conda env create -f environment.yml
conda activate batchscoringdl_aml
conda env list
echo Login Azure Account
az login -t $(sptenent) --service-principal -u $(spidentity) --password $(spsecret)
displayName: 'Initial Step'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate batchscoringdl_aml
conda env list
cd notebooks
echo Execute 01_local_testing.ipynb
papermill 01_local_testing.ipynb 01_local_testing_output.ipynb --log-output --no-progress-bar -k python3
displayName: '01_local_testing.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate batchscoringdl_aml
conda env list
cd notebooks
echo Execute 02_setup_aml.ipynb
papermill 02_setup_aml.ipynb 02_setup_aml_output.ipynb --log-output --no-progress-bar -k python3 \
-p subscription_id $(subscriptionid) \
-p resource_group $(azurergname) \
-p workspace_name $(workspacename) \
-p workspace_region $(azureregion) \
-p storage_account_name $(azurestorage)
displayName: '02_setup_aml.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate batchscoringdl_aml
conda env list
cd notebooks
echo Execute 03_develop_pipeline.ipynb
papermill 03_develop_pipeline.ipynb 03_develop_pipeline_output.ipynb --log-output --no-progress-bar -k python3
displayName: '03_develop_pipeline.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate batchscoringdl_aml
conda env list
cd notebooks
echo Execute 04_deploy_logic_apps.ipynb
papermill 04_deploy_logic_apps.ipynb 04_deploy_logic_apps_output.ipynb --log-output --no-progress-bar -k python3
displayName: '04_deploy_logic_apps.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate batchscoringdl_aml
conda env list
cd notebooks
echo Execute 05_clean_up.ipynb
papermill 05_clean_up.ipynb 05_clean_up_output.ipynb --log-output --no-progress-bar -k python3
displayName: '05_clean_up.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate batchscoringdl_aml
echo Execute Resource Group Delete
existResponse=$(az group exists -n $(azurergname))
if [ "$existResponse" == "true" ]; then
echo Deleting project resource group
az group delete --name $(azurergname) --yes
else
echo Project resource group did not exist
fi
echo Done Cleanup
displayName: 'Backup Cleanup'
condition: or(canceled(),failed())
- task: CreateWorkItem@1
inputs:
workItemType: 'Issue'
title: $(System.TeamProject) - Build $(Build.BuildNumber) Failed
assignedTo: 'JS <jiata@microsoft.com>'
associate: true
teamProject: $(System.TeamProject)
fieldMappings: |
Description=Branch: Branch $(Build.SourceBranch) failed to build. Go to Boards>WorkItems and tag the failure type.
displayName: 'Create work item on failure'
condition: failed()