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 23
/
Copy pathazure-pipelines.yml
83 lines (71 loc) · 2.95 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
# AMLBatchScoringPipeline Pipeline
trigger:
batch: true
branches:
include:
- master
variables:
- group: AzureKeyVault
jobs:
- job: AMLBatchScoringPipelineJob
timeoutInMinutes: 300
cancelTimeoutInMinutes: 2
pool:
vmImage: 'Ubuntu-16.04'
strategy:
maxParallel: 3
matrix: {"eastus": {"azurelocation": "eastus", "azurergname" : "amlbtchscreastus"},"southcentralus": {"azurelocation": "southcentralus", "azurergname" : "amlbtchscrsouthctrl"},"westus2": {"azurelocation": "westus2", "azurergname" : "amlbtchscrwestus"}}
steps:
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
which conda
conda env create -f environment.yml
conda env list
conda activate amlmm
conda env list
echo Login Azure Account
az login -t $(sptenent) --service-principal -u $(spidentity) --password $(spsecret)
displayName: 'Configuration'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate amlmm
echo Execute 00_AMLConfiguration.ipynb
papermill 00_AMLConfiguration.ipynb 00_AMLConfiguration_Output.ipynb --log-output --no-progress-bar -k python3 -p subscription_id $(subscriptionid) -p resource_group $(azurergname) -p workspace_region $(azurelocation) -p workspace_name amlsws
displayName: '00_AMLConfiguration.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate amlmm
echo Execute 01_DataPrep.ipynb
papermill 01_DataPrep.ipynb 01_DataPrep.ipynb --log-output --no-progress-bar -k python3 -p subscription_id $(subscriptionname) -p resource_group $(azurergname) -p workspace_region $(azurelocation)
displayName: '01_DataPrep.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate amlmm
echo Execute 02_create_pipeline.ipynb
papermill 02_create_pipeline.ipynb 02_create_pipeline_Output.ipynb --log-output --no-progress-bar -k python3
displayName: '02_create_pipeline.ipynb'
- bash: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate amlmm
echo Execute Resource Group Delete
existResponse=$(az group exists -n $(azurergname))
if [ "$existResponse" == "true" ]; then
echo Deleting resource group $(azurergname)
az group delete --name $(azurergname) --yes
else
echo Resource group did not exist $(azurergname)
fi
echo Done Cleanup
displayName: 'Cleanup'
condition: always()
- task: CreateWorkItem@1
inputs:
workItemType: 'Issue'
title: $(System.TeamProject) - Build $(Build.BuildNumber) Failed
assignedTo: 'Katherine Lin <[email protected]>'
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()