github_repo_scraped
/
repos
/Azure-azure-sdk-for-python-c89899b
/scripts
/auto_release
/PythonSdkLiveTest.yml
# Live Test For Python SDK | |
name: AUTO RELEASE | |
trigger: | |
branches: | |
exclude: | |
- '*' | |
# avoid being triggered as part of CI check | |
pr: | |
branches: | |
exclude: | |
- '*' | |
variables: | |
- group: Release Secrets for GitHub | |
- group: Azure SDK Auto Release Pipeline Secrets | |
jobs: | |
- job: LiveTestPython38 | |
displayName: Live Test Python 3.8 | |
timeoutInMinutes: 1500 | |
strategy: | |
maxParallel: 5 | |
pool: | |
vmImage: 'ubuntu-20.04' | |
variables: | |
Codeql.Enabled: false | |
steps: | |
- task: UsePythonVersion@0 | |
inputs: | |
versionSpec: '3.8' | |
addToPath: true | |
architecture: 'x64' | |
- bash: | | |
python scripts/dev_setup.py -p azure-core | |
cd .. | |
git config --global user.email "PythonSdkPipelines" | |
git config --global user.name "$(USR_NAME)" | |
# clone(REPO: https://github.com/Azure/azure-sdk-for-python.git, USR_NAME: Azure, USR_TOKEN: xxxxxxxxxxxxx) | |
mkdir azure-sdk-for-python | |
git clone ${REPO:0:8}$(USR_NAME):$(azuresdk-github-pat)@${REPO:8} $(pwd)/azure-sdk-for-python | |
- template: /eng/common/testproxy/test-proxy-tool.yml | |
parameters: | |
rootFolder: ../azure-sdk-for-python | |
- bash: | | |
script_path=$(pwd)/scripts/auto_release | |
cd .. | |
# prepare env if need to generate SDK code | |
if [ "$(SPEC_README)" ]; then | |
mkdir azure-rest-api-specs | |
git clone https://github.com/Azure/azure-rest-api-specs.git $(pwd)/azure-rest-api-specs | |
if [ "$(REST_REPO_HASH)" ]; then | |
cd azure-rest-api-specs | |
git reset --hard $(REST_REPO_HASH) | |
cd ../ | |
fi | |
# install autorest | |
sudo npm init -f | |
sudo npm install -g autorest --save | |
sudo npm install -g @azure-tools/typespec-client-generator-cli | |
mkdir temp_folder | |
export SPEC_README=$(SPEC_README) | |
export SPEC_REPO=$(pwd)/azure-rest-api-specs | |
export TEMP_FOLDER=$(pwd)/temp_folder | |
export DEBUG_REST_BRANCH=$(DEBUG_REST_BRANCH) | |
fi | |
# create virtual env | |
python -m venv venv-sdk | |
source venv-sdk/bin/activate | |
python -m pip install -r $script_path/requirement.txt | |
# import env variable | |
export AZURE_TEST_RUN_LIVE=$(AZURE_TEST_RUN_LIVE) | |
export TENANT_ID=$(ENV-TENANT-ID) | |
export SUBSCRIPTION_ID=$(ENV-SUBSCRIPTION-ID) | |
export AZURE_TENANT_ID=$(ENV-TENANT-ID) | |
export AZURE_SUBSCRIPTION_ID=$(ENV-SUBSCRIPTION-ID) | |
export ISSUE_LINK=$(ISSUE_LINK) | |
export SCRIPT_PATH=$script_path | |
export BOT_TOKEN=$(azuresdk-github-pat) | |
export GIT_TOKEN=$(Yuchao-GitToken) | |
export PYTHON_TAG=$(PYTHON_TAG) | |
export DEBUG_SDK_BRANCH=$(DEBUG_SDK_BRANCH) | |
export TARGET_DATE=$(TARGET_DATE) | |
export TEST_FOLDER=$(TEST_FOLDER) | |
export ISSUE_OWNER=$(ISSUE_OWNER) | |
# run | |
cd azure-sdk-for-python | |
python $script_path/main.py | |