Skip to content

Commit

Permalink
best practices devops: add template for common use in pipelines (#814)
Browse files Browse the repository at this point in the history
* bp devops add template for use in all pipelines to abstract common code

* add displayname for template

* no displayname for template
  • Loading branch information
bethz authored and miguelgfierro committed Jun 6, 2019
1 parent e0f8b8c commit beab2f7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
25 changes: 2 additions & 23 deletions tests/ci/cpu_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@ variables:
value : '"not notebooks and not spark and not gpu"'
- name : 'junitxml'
value : 'reports/test-unit.xml'
#
- name : 'maxnodes'
value : 4
#- name : 'rg'
# value : 'recommender'
#- name : 'wsname'
# value : 'RecoWS'
- name : 'reponame'
value : 'Recommenders'
- name : 'branch'
Expand Down Expand Up @@ -52,30 +47,14 @@ steps:
az login --service-principal -u $(ClientID) -p $(ClientSecret) --tenant $(TenantID)
displayName: 'Login to Azure'

- bash: |
echo "##vso[task.prependpath]/data/anaconda/bin"
displayName: Add Conda to PATH
- template: env-setup.yml

- script:
pip install azureml-sdk
displayName: 'install azureml-sdk'

- script:
python scripts/generate_conda_file.py --name reco
displayName: ' generate_conda_file.py'

- script: |
chmod +x scripts/*.py
chmod +x tests/ci/*.py
displayName: 'ls'

- script: |
pip install azure-cli
pip install --upgrade azureml-sdk[cli]
displayName: 'install cli'

- script:
python tests/ci/submit_azureml_pytest.py --subid $(SubscriptionID) --testmarkers $(testmarkers) --clustername $(clustername) --expname $(expname) --dockerproc $(dockerproc) --junitxml $(junitxml) --reponame $(reponame) --branch $(branch)
python tests/ci/submit_azureml_pytest.py --subid $(SubscriptionID) --testfolder $(testfolder) --testmarkers $(testmarkers) --clustername $(clustername) --expname $(expname) --dockerproc $(dockerproc) --junitxml $(junitxml) --reponame $(reponame) --branch $(branch)
displayName: 'submit_azureml_pytest'

- task: PublishTestResults@2
Expand Down
25 changes: 25 additions & 0 deletions tests/ci/env-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# file: env-setup.yml
#

steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
architecture: 'x64'
displayName: 'Use Python 3.6'

- bash: |
echo "##vso[task.prependpath]/data/anaconda/bin"
displayName: Add Conda to PATH

- script:
pip install azureml-sdk &&
pip install azure-cli &&
pip install --upgrade azureml-sdk[cli]
displayName: 'install azureml-sdk'



0 comments on commit beab2f7

Please sign in to comment.