72 строки
3.0 KiB
YAML
72 строки
3.0 KiB
YAML
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
|
||
|
||
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": "$(subscription_id)"#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)'
|
||
|
||
- task: PublishBuildArtifacts@1
|
||
displayName: 'Publish Artifact: AML Pipeline Config'
|
||
inputs:
|
||
ArtifactName: 'devops-for-ai-aml-pipeline'
|
||
publishLocation: 'container'
|
||
pathtoPublish: '$(Build.ArtifactStagingDirectory)/aml_config/pipeline_config.json'
|
||
TargetPath: '$(Build.ArtifactStagingDirectory)/aml_config/pipeline_config.json'
|
||
|