Skip to content

Commit 3586bb3

Browse files
committed
build: simple devops AI pipeline
1 parent 934c8fb commit 3586bb3

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
pool:
2+
vmImage: 'Ubuntu 16.04'
3+
#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
4+
#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
5+
#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
6+
#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
7+
8+
steps:
9+
- task: UsePythonVersion@0
10+
inputs:
11+
versionSpec: '3.6'
12+
architecture: 'x64'
13+
14+
- task: Bash@3
15+
displayName: 'Install Requirements'
16+
inputs:
17+
targetType: filePath
18+
filePath: 'environment_setup/install_requirements.sh'
19+
workingDirectory: 'environment_setup'
20+
21+
- script: |
22+
az login --service-principal -u $(sp_username) -p $(sp_password) --tenant $(sp_tenantid)
23+
24+
displayName: 'Login to Azure'
25+
26+
- script: |
27+
sed -i 's#"subscription_id": "<>"#"subscription_id": "$(subscription_id)"#g' aml_config/config.json
28+
29+
displayName: 'replace subscription value'
30+
31+
- script: 'pytest tests/unit/data_test.py'
32+
displayName: 'Data Quality Check'
33+
34+
- script: 'python aml_service/00-WorkSpace.py'
35+
displayName: 'Get or Create workspace copy'
36+
37+
- script: 'python aml_service/10-TrainOnLocal.py'
38+
displayName: 'Train on Local'
39+
40+
- script: 'python aml_service/15-EvaluateModel.py'
41+
displayName: 'Evaluate Model'
42+
43+
- script: 'python aml_service/20-RegisterModel.py'
44+
displayName: 'Register Model'
45+
46+
- script: 'python aml_service/30-CreateScoringImage.py'
47+
displayName: 'Creating scoring image'
48+
49+
- task: CopyFiles@2
50+
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
51+
inputs:
52+
SourceFolder: '$(Build.SourcesDirectory)'
53+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
54+
Contents: '**'
55+
56+
- task: PublishBuildArtifacts@1
57+
displayName: 'Publish Artifact: devops-for-ai'
58+
inputs:
59+
ArtifactName: 'devops-for-ai'
60+
publishLocation: 'container'
61+
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
62+
TargetPath: '$(Build.ArtifactStagingDirectory)'
63+
64+

0 commit comments

Comments
 (0)