Skip to content

Commit 73d44c6

Browse files
authored
{CI} Migrate regression test pipeline to BAMI (#31760)
1 parent 8d8ad53 commit 73d44c6

2 files changed

Lines changed: 19 additions & 42 deletions

File tree

scripts/regression_test/extension_regression_test.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ jobs:
2121
inputs:
2222
versionSpec: '3.12'
2323
displayName: "Use Python 3.12"
24-
- task: AzureCLI@1
25-
displayName: 'checkout branch'
26-
inputs:
27-
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
28-
scriptLocation: inlineScript
29-
inlineScript: |
24+
- bash: |
3025
set -ev
3126
pwd
3227
git clone https://github.com/Azure/azure-cli-extensions.git
@@ -39,6 +34,7 @@ jobs:
3934
git remote add azclibot https://azclibot:${GITHUB_TOKEN}@github.com/azclibot/azure-cli-extensions.git
4035
git checkout -b regression_test_$(Build.BuildId)
4136
git push --set-upstream azclibot regression_test_$(Build.BuildId)
37+
displayName: 'checkout branch'
4238
4339
- job: CLIExtensionRegressionTest
4440
displayName: CLI Extension Regression Test
@@ -78,12 +74,7 @@ jobs:
7874
inputs:
7975
versionSpec: '3.12'
8076
displayName: "Use Python 3.12"
81-
- task: AzureCLI@1
82-
displayName: 'checkout cli and extension repo'
83-
inputs:
84-
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
85-
scriptLocation: inlineScript
86-
inlineScript: |
77+
- bash: |
8778
set -ev
8879
pwd
8980
if [[ -n "$(CUSTOM_CLI_REPO)" && -n "$(CUSTOM_CLI_BRANCH)" ]]; then
@@ -103,21 +94,23 @@ jobs:
10394
10495
git fetch azclibot
10596
git checkout -b regression_test_$(Build.BuildId) azclibot/regression_test_$(Build.BuildId)
97+
displayName: 'checkout cli and extension repo'
10698
- template: ../../.azure-pipelines/templates/azdev_setup.yml
10799
parameters:
108100
CLIExtensionRepoPath: ./azure-cli-extensions
109-
- task: AzureCLI@1
101+
- task: AzureCLI@2
110102
displayName: 'Rerun tests'
111103
inputs:
112-
azureSubscription: $(AZURE_SDK_TEST_SUB_CONNECTED_SERVICE)
104+
connectedServiceNameARM: $(azure-cli-live-test-bami-connected-service)
105+
scriptType: bash
113106
scriptLocation: inlineScript
114107
inlineScript: |
115108
set -ev
116109
117110
source env/bin/activate
118111
cd azure-cli-extensions
119112
120-
az account set -s 0b1f6471-1bf0-4dda-aec3-cb9272f09590
113+
az account set -s $(azure-cli-live-test-bami-sub-id)
121114
122115
python ../scripts/ci/automation_full_test.py "12" "$(Instance_idx)" "latest" "" "True" "extension"
123116
@@ -160,12 +153,7 @@ jobs:
160153
pool:
161154
name: ${{ variables.ubuntu_pool }}
162155
steps:
163-
- task: AzureCLI@1
164-
displayName: 'Result Summary'
165-
inputs:
166-
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
167-
scriptLocation: inlineScript
168-
inlineScript: |
156+
- bash: |
169157
set -ev
170158
171159
# git config
@@ -207,3 +195,4 @@ jobs:
207195
208196
sleep 5
209197
done
198+
displayName: 'Result Summary'

scripts/regression_test/regression_test.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ jobs:
2222
inputs:
2323
versionSpec: '3.12'
2424
displayName: "Use Python 3.12"
25-
- task: AzureCLI@1
26-
displayName: 'update version'
27-
inputs:
28-
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
29-
scriptLocation: inlineScript
30-
inlineScript: |
25+
- bash: |
3126
set -ev
3227
3328
# git config
@@ -58,6 +53,7 @@ jobs:
5853
git add .
5954
git commit -m "update version"
6055
git push --set-upstream azclibot regression_test_$(Build.BuildId)
56+
displayName: 'update version'
6157
6258
- job: RerunTests
6359
displayName: CLI Regression tests
@@ -90,12 +86,7 @@ jobs:
9086
inputs:
9187
versionSpec: '3.12'
9288
displayName: "Use Python 3.12"
93-
- task: AzureCLI@1
94-
displayName: 'Checkout Target Branch'
95-
inputs:
96-
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
97-
scriptLocation: inlineScript
98-
inlineScript: |
89+
- bash: |
9990
set -ev
10091
# git config
10192
if [[ -n "$(CUSTOM_REPO)" && -n "$(CUSTOM_BRANCH)" && -n "$(CUSTOM_GITHUB_TOKEN)" ]]; then
@@ -113,11 +104,13 @@ jobs:
113104
git fetch ${GITHUB_REPO} ${GITHUB_BRANCH}
114105
115106
git checkout -b ${GITHUB_BRANCH} ${GITHUB_REPO}/${GITHUB_BRANCH}
107+
displayName: 'Checkout Target Branch'
116108
- template: ../../.azure-pipelines/templates/azdev_setup.yml
117-
- task: AzureCLI@1
109+
- task: AzureCLI@2
118110
displayName: 'Rerun tests'
119111
inputs:
120-
azureSubscription: $(AZURE_SDK_TEST_SUB_CONNECTED_SERVICE)
112+
connectedServiceNameARM: $(azure-cli-live-test-bami-connected-service)
113+
scriptType: bash
121114
scriptLocation: inlineScript
122115
inlineScript: |
123116
set -ev
@@ -128,7 +121,7 @@ jobs:
128121
pip install $(CUSTOM_WHL_URL) --force-reinstall
129122
fi
130123

131-
az account set -s 0b1f6471-1bf0-4dda-aec3-cb9272f09590
124+
az account set -s $(azure-cli-live-test-bami-sub-id)
132125

133126
serial_modules="appservice botservice cloud network azure-cli-core azure-cli-telemetry"
134127
python scripts/ci/automation_full_test.py "8" "$(Instance_idx)" "latest" "$serial_modules" "True"
@@ -144,12 +137,7 @@ jobs:
144137
pool:
145138
name: ${{ variables.ubuntu_pool }}
146139
steps:
147-
- task: AzureCLI@1
148-
displayName: 'Create PR'
149-
inputs:
150-
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
151-
scriptLocation: inlineScript
152-
inlineScript: |
140+
- bash: |
153141
set -ev
154142
# git config
155143
if [[ -n "$(CUSTOM_REPO)" && -n "$(CUSTOM_BRANCH)" && -n "$(CUSTOM_GITHUB_TOKEN)" ]]; then

0 commit comments

Comments
 (0)