Skip to content

Commit 3fb7466

Browse files
committed
build: Adding yaml build configuration file
1 parent a88ab43 commit 3fb7466

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

aml_config/azure-pipelines.yml

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

0 commit comments

Comments
 (0)