зеркало из https://github.com/Azure/Avere.git
75 строки
2.1 KiB
YAML
75 строки
2.1 KiB
YAML
# https://aka.ms/yaml
|
|
# trigger:
|
|
# - master
|
|
# - releases/*
|
|
|
|
pool:
|
|
vmImage: 'Ubuntu 16.04'
|
|
|
|
steps:
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.7'
|
|
architecture: 'x64'
|
|
|
|
- script: |
|
|
mkdir ~/.ssh && cd $_
|
|
ssh-keygen -t rsa -N "" -f id_rsa
|
|
ls -al
|
|
echo "SSH PUBLIC KEY: $(cat ~/.ssh/id_rsa.pub)"
|
|
displayName: 'Generate SSH keys'
|
|
|
|
- script: |
|
|
python3 --version
|
|
pip install --upgrade pip setuptools wheel
|
|
pip install -r test/requirements.txt
|
|
displayName: 'Install Python Dependencies'
|
|
|
|
- script: |
|
|
pytest test/test_avere_template_deploy.py --doctest-modules --junitxml=junit/test-results1.xml
|
|
displayName: 'Test Avere vFXT template-based deployment'
|
|
env:
|
|
AVERE_ADMIN_PW: $(controllerpassword)
|
|
AVERE_CONTROLLER_PW: $(controllerpassword)
|
|
AZURE_TENANT_ID: $(SPTENANTID)
|
|
AZURE_CLIENT_ID: $(SPAPPID)
|
|
AZURE_CLIENT_SECRET: $(SPPW)
|
|
AZURE_SUBSCRIPTION_ID: $(AZURE-SUBSCRIPTION-ID)
|
|
VFXT_TEST_VARS_FILE: pipelines.json
|
|
|
|
- script: |
|
|
pytest test/test_vdbench.py --doctest-modules --junitxml=junit/test-results2.xml
|
|
displayName: 'Test vdbench on cluster'
|
|
env:
|
|
AZURE_TENANT_ID: $(SPTENANTID)
|
|
AZURE_CLIENT_ID: $(SPAPPID)
|
|
AZURE_CLIENT_SECRET: $(SPPW)
|
|
AZURE_SUBSCRIPTION_ID: $(AZURE-SUBSCRIPTION-ID)
|
|
VFXT_TEST_VARS_FILE: pipelines.json
|
|
|
|
- script: |
|
|
for file in $(ls vfxt*.log); do
|
|
echo "DUMPING $file"
|
|
cat $file
|
|
echo
|
|
done
|
|
displayName: 'Dump vfxt.log files'
|
|
condition: succeededOrFailed()
|
|
|
|
- script: |
|
|
az login --service-principal -u $AZURE_CLIENT_ID -p $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID
|
|
RESOURCE_GROUP=$(grep resource_group $VFXT_TEST_VARS_FILE | sed -E 's/^.*resource_group": "([^"]+)".*$/\1/')
|
|
az group delete --yes -n $RESOURCE_GROUP
|
|
displayName: 'Delete resource group'
|
|
condition: always()
|
|
env:
|
|
AZURE_TENANT_ID: $(SPTENANTID)
|
|
AZURE_CLIENT_ID: $(SPAPPID)
|
|
AZURE_CLIENT_SECRET: $(SPPW)
|
|
VFXT_TEST_VARS_FILE: pipelines.json
|
|
|
|
- task: PublishTestResults@2
|
|
condition: succeededOrFailed()
|
|
inputs:
|
|
testResultsFiles: 'junit/test-results*.xml'
|
|
testRunTitle: 'Publish pytest results' |