Skip to content

Commit 231c5d0

Browse files
committed
fix cli login issue for regression test pipeline
1 parent 190b2d0 commit 231c5d0

File tree

2 files changed

+42
-11
lines changed

2 files changed

+42
-11
lines changed

scripts/regression_test/extension_regression_test.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ jobs:
2121
inputs:
2222
versionSpec: '3.12'
2323
displayName: "Use Python 3.12"
24-
- bash: |
24+
- task: AzureCLI@2
25+
displayName: 'checkout branch'
26+
inputs:
27+
connectedServiceNameARM: $(azure-cli-live-test-msft-connected-service)
28+
scriptType: bash
29+
scriptLocation: inlineScript
30+
inlineScript: |
2531
set -ev
2632
pwd
2733
git clone https://github.com/Azure/azure-cli-extensions.git
@@ -34,7 +40,6 @@ jobs:
3440
git remote add azclibot https://azclibot:${GITHUB_TOKEN}@github.com/azclibot/azure-cli-extensions.git
3541
git checkout -b regression_test_$(Build.BuildId)
3642
git push --set-upstream azclibot regression_test_$(Build.BuildId)
37-
displayName: 'checkout branch'
3843
3944
- job: CLIExtensionRegressionTest
4045
displayName: CLI Extension Regression Test
@@ -74,7 +79,13 @@ jobs:
7479
inputs:
7580
versionSpec: '3.12'
7681
displayName: "Use Python 3.12"
77-
- bash: |
82+
- task: AzureCLI@2
83+
displayName: 'checkout cli and extension repo'
84+
inputs:
85+
connectedServiceNameARM: $(azure-cli-live-test-msft-connected-service)
86+
scriptType: bash
87+
scriptLocation: inlineScript
88+
inlineScript: |
7889
set -ev
7990
pwd
8091
if [[ -n "$(CUSTOM_CLI_REPO)" && -n "$(CUSTOM_CLI_BRANCH)" ]]; then
@@ -94,7 +105,6 @@ jobs:
94105
95106
git fetch azclibot
96107
git checkout -b regression_test_$(Build.BuildId) azclibot/regression_test_$(Build.BuildId)
97-
displayName: 'checkout cli and extension repo'
98108
- template: ../../.azure-pipelines/templates/azdev_setup.yml
99109
parameters:
100110
CLIExtensionRepoPath: ./azure-cli-extensions
@@ -153,7 +163,13 @@ jobs:
153163
pool:
154164
name: ${{ variables.ubuntu_pool }}
155165
steps:
156-
- bash: |
166+
- task: AzureCLI@2
167+
displayName: 'Result Summary'
168+
inputs:
169+
connectedServiceNameARM: $(azure-cli-live-test-msft-connected-service)
170+
scriptType: bash
171+
scriptLocation: inlineScript
172+
inlineScript: |
157173
set -ev
158174
159175
# git config
@@ -195,4 +211,3 @@ jobs:
195211
196212
sleep 5
197213
done
198-
displayName: 'Result Summary'

scripts/regression_test/regression_test.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ jobs:
2222
inputs:
2323
versionSpec: '3.12'
2424
displayName: "Use Python 3.12"
25-
- bash: |
25+
- task: AzureCLI@2
26+
displayName: 'update version'
27+
inputs:
28+
connectedServiceNameARM: $(azure-cli-live-test-msft-connected-service)
29+
scriptType: bash
30+
scriptLocation: inlineScript
31+
inlineScript: |
2632
set -ev
2733
2834
# git config
@@ -53,7 +59,6 @@ jobs:
5359
git add .
5460
git commit -m "update version"
5561
git push --set-upstream azclibot regression_test_$(Build.BuildId)
56-
displayName: 'update version'
5762
5863
- job: RerunTests
5964
displayName: CLI Regression tests
@@ -86,7 +91,13 @@ jobs:
8691
inputs:
8792
versionSpec: '3.12'
8893
displayName: "Use Python 3.12"
89-
- bash: |
94+
- task: AzureCLI@2
95+
displayName: 'Checkout Target Branch'
96+
inputs:
97+
connectedServiceNameARM: $(azure-cli-live-test-msft-connected-service)
98+
scriptType: bash
99+
scriptLocation: inlineScript
100+
inlineScript: |
90101
set -ev
91102
# git config
92103
if [[ -n "$(CUSTOM_REPO)" && -n "$(CUSTOM_BRANCH)" && -n "$(CUSTOM_GITHUB_TOKEN)" ]]; then
@@ -104,7 +115,6 @@ jobs:
104115
git fetch ${GITHUB_REPO} ${GITHUB_BRANCH}
105116
106117
git checkout -b ${GITHUB_BRANCH} ${GITHUB_REPO}/${GITHUB_BRANCH}
107-
displayName: 'Checkout Target Branch'
108118
- template: ../../.azure-pipelines/templates/azdev_setup.yml
109119
- task: AzureCLI@2
110120
displayName: 'Rerun tests'
@@ -137,7 +147,13 @@ jobs:
137147
pool:
138148
name: ${{ variables.ubuntu_pool }}
139149
steps:
140-
- bash: |
150+
- task: AzureCLI@2
151+
displayName: 'Create PR'
152+
inputs:
153+
connectedServiceNameARM: $(azure-cli-live-test-msft-connected-service)
154+
scriptType: bash
155+
scriptLocation: inlineScript
156+
inlineScript: |
141157
set -ev
142158
# git config
143159
if [[ -n "$(CUSTOM_REPO)" && -n "$(CUSTOM_BRANCH)" && -n "$(CUSTOM_GITHUB_TOKEN)" ]]; then

0 commit comments

Comments
 (0)