Skip to content

Commit 934c8fb

Browse files
committed
build: added retraining pipeline trigger
1 parent 1f1d782 commit 934c8fb

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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: 'python aml_service/05-TriggerAmlPipeline.py'
32+
displayName: 'Trigger retraining Azure ML Pipeline'
33+
34+
- task: CopyFiles@2
35+
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
36+
inputs:
37+
SourceFolder: '$(Build.SourcesDirectory)'
38+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
39+
Contents: '**'
40+
41+
- task: PublishBuildArtifacts@1
42+
displayName: 'Publish Artifact: devops-for-ai'
43+
inputs:
44+
ArtifactName: 'devops-for-ai'
45+
publishLocation: 'container'
46+
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
47+
TargetPath: '$(Build.ArtifactStagingDirectory)'
48+
49+

0 commit comments

Comments
 (0)