Skip to content

Commit

Permalink
{CI} Fix regression test pipeline (#28313)
Browse files Browse the repository at this point in the history
* fix regression test pipeline

* use variables for service connection name
  • Loading branch information
evelyn-ys authored Feb 7, 2024
1 parent 03ad904 commit e773a71
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
31 changes: 17 additions & 14 deletions scripts/regression_test/extension_regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- task: AzureCLI@1
displayName: 'checkout branch'
inputs:
azureSubscription: 'Azure CLI release'
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- task: AzureCLI@1
displayName: 'checkout cli and extension repo'
inputs:
azureSubscription: 'Azure CLI release'
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
Expand All @@ -106,17 +106,20 @@ jobs:
- template: ../../.azure-pipelines/templates/azdev_setup.yml
parameters:
CLIExtensionRepoPath: ./azure-cli-extensions
- bash: |
set -ev
source env/bin/activate
cd azure-cli-extensions
az login -u $(CLI_LIVE_TEST_ACCOUNT) -p "$(CLI_LIVE_TEST_PASSWORD)"
az account set -s 0b1f6471-1bf0-4dda-aec3-cb9272f09590
python ../scripts/ci/automation_full_test.py "12" "$(Instance_idx)" "latest" "" "True" "extension"
displayName: "Rerun tests"
- task: AzureCLI@1
displayName: 'Rerun tests'
inputs:
azureSubscription: $(AZURE_SDK_TEST_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
source env/bin/activate
cd azure-cli-extensions

az account set -s 0b1f6471-1bf0-4dda-aec3-cb9272f09590

python ../scripts/ci/automation_full_test.py "12" "$(Instance_idx)" "latest" "" "True" "extension"
- bash: |
publishErrorModules='false'
if [[ -f '/$(HOME)/.azdev/env_config/mnt/vss/_work/1/s/env/test_results_error_modules_$(Instance_idx).txt' ]]; then
Expand Down Expand Up @@ -159,7 +162,7 @@ jobs:
- task: AzureCLI@1
displayName: 'Result Summary'
inputs:
azureSubscription: 'Azure CLI release'
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
Expand Down
39 changes: 21 additions & 18 deletions scripts/regression_test/regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- task: AzureCLI@1
displayName: 'update version'
inputs:
azureSubscription: 'Azure CLI release'
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
- task: AzureCLI@1
displayName: 'Checkout Target Branch'
inputs:
azureSubscription: 'Azure CLI release'
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
Expand All @@ -114,21 +114,24 @@ jobs:
git checkout -b ${GITHUB_BRANCH} ${GITHUB_REPO}/${GITHUB_BRANCH}
- template: ../../.azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
source env/bin/activate
if [[ -n "$(CUSTOM_WHL_URL)" ]]; then
pip install $(CUSTOM_WHL_URL) --force-reinstall
fi
az login -u $(CLI_LIVE_TEST_ACCOUNT) -p "$(CLI_LIVE_TEST_PASSWORD)"
az account set -s 0b1f6471-1bf0-4dda-aec3-cb9272f09590
serial_modules="appservice botservice cloud network azure-cli-core azure-cli-telemetry"
python scripts/ci/automation_full_test.py "8" "$(Instance_idx)" "latest" "$serial_modules" "True"
displayName: "Rerun tests"
- task: AzureCLI@1
displayName: 'Rerun tests'
inputs:
azureSubscription: $(AZURE_SDK_TEST_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
source env/bin/activate

if [[ -n "$(CUSTOM_WHL_URL)" ]]; then
pip install $(CUSTOM_WHL_URL) --force-reinstall
fi

az account set -s 0b1f6471-1bf0-4dda-aec3-cb9272f09590

serial_modules="appservice botservice cloud network azure-cli-core azure-cli-telemetry"
python scripts/ci/automation_full_test.py "8" "$(Instance_idx)" "latest" "$serial_modules" "True"
- task: PublishTestResults@2
inputs:
testResultsFiles: '/$(HOME)/.azdev/env_config/mnt/vss/_work/1/s/env/test_results_*.xml'
Expand All @@ -144,7 +147,7 @@ jobs:
- task: AzureCLI@1
displayName: 'Create PR'
inputs:
azureSubscription: 'Azure CLI release'
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
scriptLocation: inlineScript
inlineScript: |
set -ev
Expand Down

0 comments on commit e773a71

Please sign in to comment.