forked from microsoft/MLOpsPython
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
68 lines (52 loc) · 2.75 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
pool:
vmImage: 'Ubuntu 16.04'
#Your build pipeline references a secret variable named ‘sp_username’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references a secret variable named ‘sp_password’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references a secret variable named ‘sp_tenantid’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references a secret variable named ‘subscription_id’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972
variables:
- group: AzureKeyVaultSecrets
trigger:
- master
- releases/*
- develop
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
architecture: 'x64'
- task: Bash@3
displayName: 'Install Requirements'
inputs:
targetType: filePath
filePath: 'environment_setup/install_requirements.sh'
workingDirectory: 'environment_setup'
- script: |
az login --service-principal -u $(spidentity) -p $(spsecret) --tenant $(sptenant)
displayName: 'Login to Azure'
- script: |
sed -i 's#"subscription_id": "<>"#"subscription_id": "$(subscriptionid)"#g' aml_config/config.json
displayName: 'replace subscription value'
- script: 'pytest tests/unit/data_test.py'
displayName: 'Data Quality Check'
- script: 'python aml_service/00-WorkSpace.py'
displayName: 'Get or Create Workspace'
- script: 'python aml_service/03-AttachAmlCluster.py'
displayName: 'Create AML Compute Cluster'
- script: 'python aml_service/04-AmlPipelines.py'
displayName: 'Create and Test AML Pipeline'
- script: 'python aml_service/04-AmlPipelines.py --pipeline_action publish'
displayName: 'Publish AML Pipeline as Endpoint'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
Contents: '**'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: devops-for-ai'
inputs:
ArtifactName: 'devops-for-ai'
publishLocation: 'container'
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
TargetPath: '$(Build.ArtifactStagingDirectory)'