From 872622bc37e72a20dd73e7c5658b118c6f6b59f3 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 1 Mar 2022 16:17:33 -0500 Subject: [PATCH 1/7] add us as codeowners for all of autorest --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 57c7045c2b1..92953397229 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,5 +2,7 @@ # Automation ################ +* @iscai-msft @msyyc @changlong-liu + # Git Hub bot rules /.github/fabricbot.json @AlexGhiondea @jsquire From 81cb2434aa689e1d92dfb19329ae37b1eaaad2d1 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 1 Mar 2022 16:29:43 -0500 Subject: [PATCH 2/7] add storage blob --- eng/pipelines/ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index 7be82bebfb6..1c6494ce36b 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -20,6 +20,10 @@ parameters: default: - name: azure-messaging-webpubsubservice service: webpubsub + branchName: main + - name: azure-storage-blob + service: storage + branchName: feature/storage-autorest jobs: - job: "AutoRest_Python_CI" @@ -209,16 +213,15 @@ jobs: condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.10')) - ${{ if eq(and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['PythonVersion'], '2.7')), 'True') }}: - - script: | - git clone https://github.com/Azure/azure-sdk-for-python.git --depth=1 --branch main $(Build.SourcesDirectory)/regenerated/ - displayName: 'Clone python repo' - - - script: | - pip install tox-monorepo - displayName: 'Prepare environment' - workingDirectory: '$(Build.SourcesDirectory)/regenerated/' - - ${{ each package in parameters.VerificationPackages }}: + - script: | + git clone https://github.com/Azure/azure-sdk-for-python.git --depth=1 --branch ${{ package.branchName }} $(Build.SourcesDirectory)/regenerated/ + displayName: 'Clone python repo' + + - script: | + pip install tox-monorepo + displayName: 'Prepare environment' + workingDirectory: '$(Build.SourcesDirectory)/regenerated/' - script: | autorest ./swagger/README.md --use=$(Build.SourcesDirectory) displayName: 'Regenerate target package ${{ package.name }}' From 4e858d437dd6a2c5c3a7581fff57efd981212c4f Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 1 Mar 2022 16:30:07 -0500 Subject: [PATCH 3/7] remove all but regen checks --- eng/pipelines/ci.yml | 146 +------------------------------------------ 1 file changed, 1 insertion(+), 145 deletions(-) diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index 1c6494ce36b..bb5faf78116 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -66,151 +66,7 @@ jobs: npm install -g autorest npm install displayName: 'Prepare Environment for Generation' - - script: | - pylint autorest - displayName: 'Pylint' - - script: | - mypy autorest - displayName: 'Mypy' - - script: | - pytest test/unittests - displayName: 'Unit tests' - - script: | - inv regenerate - displayName: 'Regenerate Code' - - script: | - git add -A # 'add' first so 'diff' includes untracked files - git diff --staged -w - displayName: 'Diff regeneration' - - task: UsePythonVersion@0 - displayName: 'Use Python $(PythonVersion)' - inputs: - versionSpec: $(PythonVersion) - - - script: | - pip install pip==20.2 - pip install tox coverage - displayName: "Install Env Specific Reqs in Target PyVersion $(PythonVersion)" - - script: | - cd $(TestFolder)/azure/legacy - tox -e ci - displayName: 'Execute legacy "azure" Tests - Python $(PythonVersion)' - - task: PublishTestResults@2 - condition: always() - displayName: 'Publish legacy "azure" Test Results' - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - legacy azure" - searchFolder: "$(TestFolder)/azure/legacy" - - - script: | - cd $(TestFolder)/azure/low-level - tox -e ci - displayName: 'Execute low-level "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - displayName: 'Publish low-level "azure" Test Results' - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - low-level azure" - searchFolder: "$(TestFolder)/azure/low-level" - - - script: | - cd $(TestFolder)/azure/version-tolerant - tox -e ci - displayName: 'Execute version-tolerant "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - displayName: 'Publish version-tolerant "azure" Test Results' - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant azure" - searchFolder: "$(TestFolder)/azure/version-tolerant" - - - script: | - cd $(TestFolder)/azure/version-tolerant - tox -e lint - displayName: 'Lint version-tolerant "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) - - - script: | - cd $(TestFolder)/vanilla/legacy - tox -e ci - displayName: 'Execute legacy "vanilla" Tests - Python $(PythonVersion)' - - task: PublishTestResults@2 - displayName: 'Publish legacy "vanilla" Test Results' - condition: always() - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - legacy vanilla" - searchFolder: "$(TestFolder)/vanilla/legacy" - - - script: | - cd $(TestFolder)/vanilla/low-level - tox -e ci - displayName: 'Execute low level "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - displayName: 'Publish low level "vanilla" Test Results' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - low level vanilla" - searchFolder: "$(TestFolder)/vanilla/low-level" - - - script: | - cd $(TestFolder)/vanilla/version-tolerant - tox -e ci - displayName: 'Execute version-tolerant "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - displayName: 'Publish version-tolerant "vanilla" Test Results' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant vanilla" - searchFolder: "$(TestFolder)/vanilla/version-tolerant" - - - script: | - cd $(TestFolder)/vanilla/version-tolerant - tox -e lint - displayName: 'Lint version-tolerant "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) - - - script: | - cd $(TestFolder)/dpg/low-level - tox -e ci - displayName: 'Execute low level update "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - script: | - cd $(TestFolder)/dpg/version-tolerant - tox -e ci - displayName: 'Execute version-tolerant update "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - script: | - cd $(TestFolder)/dpg/version-tolerant - tox -e lint - displayName: 'Lint version-tolerant "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) - - script: | - cd $(TestFolder)/multiapi - tox -e ci - displayName: 'Execute "multiapi" Tests - Python $(PythonVersion)' - - task: PublishTestResults@2 - displayName: 'Publish "multiapi" Test Results' - condition: always() - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - multiapi" - searchFolder: "$(TestFolder)/multiapi" - - - script: | - npm pack - AbsolutePkgPath=$(find "$(pwd)" -name "autorest-python-*" -maxdepth 1) - cd .. - npm install $AbsolutePkgPath - displayName: "Test tarball" - - - script: | - npm run coverage -- publish --repo=$(Build.Repository.Name) --ref=$(Build.SourceBranch) --githubToken=$(github-token) --azStorageAccount=$(storage-coverage-user) --azStorageAccessKey=$(storage-coverage-pass) --coverageDirectory=$(AUTOREST_TESTSERVER_COVERAGE_DIRECTORY) - workingDirectory: node_modules/@microsoft.azure/autorest.testserver - displayName: "Publish coverage report to storage account" - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.10')) + - ${{ if eq(and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['PythonVersion'], '2.7')), 'True') }}: - ${{ each package in parameters.VerificationPackages }}: From f4ef7192270649d90cd086bd58104d279cb81e52 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 1 Mar 2022 16:43:52 -0500 Subject: [PATCH 4/7] clone once --- eng/pipelines/ci.yml | 165 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 156 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index bb5faf78116..9dee4a8f12e 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -66,19 +66,166 @@ jobs: npm install -g autorest npm install displayName: 'Prepare Environment for Generation' - + - script: | + pylint autorest + displayName: 'Pylint' + - script: | + mypy autorest + displayName: 'Mypy' + - script: | + pytest test/unittests + displayName: 'Unit tests' + - script: | + inv regenerate + displayName: 'Regenerate Code' + - script: | + git add -A # 'add' first so 'diff' includes untracked files + git diff --staged -w + displayName: 'Diff regeneration' + - task: UsePythonVersion@0 + displayName: 'Use Python $(PythonVersion)' + inputs: + versionSpec: $(PythonVersion) + + - script: | + pip install pip==20.2 + pip install tox coverage + displayName: "Install Env Specific Reqs in Target PyVersion $(PythonVersion)" + - script: | + cd $(TestFolder)/azure/legacy + tox -e ci + displayName: 'Execute legacy "azure" Tests - Python $(PythonVersion)' + - task: PublishTestResults@2 + condition: always() + displayName: 'Publish legacy "azure" Test Results' + inputs: + testRunTitle: "$(OSName) Python $(PythonVersion) - legacy azure" + searchFolder: "$(TestFolder)/azure/legacy" + + - script: | + cd $(TestFolder)/azure/low-level + tox -e ci + displayName: 'Execute low-level "azure" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + - task: PublishTestResults@2 + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + displayName: 'Publish low-level "azure" Test Results' + inputs: + testRunTitle: "$(OSName) Python $(PythonVersion) - low-level azure" + searchFolder: "$(TestFolder)/azure/low-level" + + - script: | + cd $(TestFolder)/azure/version-tolerant + tox -e ci + displayName: 'Execute version-tolerant "azure" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + - task: PublishTestResults@2 + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + displayName: 'Publish version-tolerant "azure" Test Results' + inputs: + testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant azure" + searchFolder: "$(TestFolder)/azure/version-tolerant" + + - script: | + cd $(TestFolder)/azure/version-tolerant + tox -e lint + displayName: 'Lint version-tolerant "azure" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) + + - script: | + cd $(TestFolder)/vanilla/legacy + tox -e ci + displayName: 'Execute legacy "vanilla" Tests - Python $(PythonVersion)' + - task: PublishTestResults@2 + displayName: 'Publish legacy "vanilla" Test Results' + condition: always() + inputs: + testRunTitle: "$(OSName) Python $(PythonVersion) - legacy vanilla" + searchFolder: "$(TestFolder)/vanilla/legacy" + + - script: | + cd $(TestFolder)/vanilla/low-level + tox -e ci + displayName: 'Execute low level "vanilla" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + - task: PublishTestResults@2 + displayName: 'Publish low level "vanilla" Test Results' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + inputs: + testRunTitle: "$(OSName) Python $(PythonVersion) - low level vanilla" + searchFolder: "$(TestFolder)/vanilla/low-level" + + - script: | + cd $(TestFolder)/vanilla/version-tolerant + tox -e ci + displayName: 'Execute version-tolerant "vanilla" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + - task: PublishTestResults@2 + displayName: 'Publish version-tolerant "vanilla" Test Results' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + inputs: + testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant vanilla" + searchFolder: "$(TestFolder)/vanilla/version-tolerant" + + - script: | + cd $(TestFolder)/vanilla/version-tolerant + tox -e lint + displayName: 'Lint version-tolerant "vanilla" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) + + - script: | + cd $(TestFolder)/dpg/low-level + tox -e ci + displayName: 'Execute low level update "dpg" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + - script: | + cd $(TestFolder)/dpg/version-tolerant + tox -e ci + displayName: 'Execute version-tolerant update "dpg" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + - script: | + cd $(TestFolder)/dpg/version-tolerant + tox -e lint + displayName: 'Lint version-tolerant "dpg" Tests - Python $(PythonVersion)' + condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) + - script: | + cd $(TestFolder)/multiapi + tox -e ci + displayName: 'Execute "multiapi" Tests - Python $(PythonVersion)' + - task: PublishTestResults@2 + displayName: 'Publish "multiapi" Test Results' + condition: always() + inputs: + testRunTitle: "$(OSName) Python $(PythonVersion) - multiapi" + searchFolder: "$(TestFolder)/multiapi" + + - script: | + npm pack + AbsolutePkgPath=$(find "$(pwd)" -name "autorest-python-*" -maxdepth 1) + cd .. + npm install $AbsolutePkgPath + displayName: "Test tarball" + + - script: | + npm run coverage -- publish --repo=$(Build.Repository.Name) --ref=$(Build.SourceBranch) --githubToken=$(github-token) --azStorageAccount=$(storage-coverage-user) --azStorageAccessKey=$(storage-coverage-pass) --coverageDirectory=$(AUTOREST_TESTSERVER_COVERAGE_DIRECTORY) + workingDirectory: node_modules/@microsoft.azure/autorest.testserver + displayName: "Publish coverage report to storage account" + condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.10')) - ${{ if eq(and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['PythonVersion'], '2.7')), 'True') }}: - - ${{ each package in parameters.VerificationPackages }}: - - script: | - git clone https://github.com/Azure/azure-sdk-for-python.git --depth=1 --branch ${{ package.branchName }} $(Build.SourcesDirectory)/regenerated/ - displayName: 'Clone python repo' + - script: | + git clone https://github.com/Azure/azure-sdk-for-python.git --depth=1 $(Build.SourcesDirectory)/regenerated/ + displayName: 'Clone python repo' + - script: | + pip install tox-monorepo + displayName: 'Prepare environment' + workingDirectory: '$(Build.SourcesDirectory)/regenerated/' + + - ${{ each package in parameters.VerificationPackages }}: - script: | - pip install tox-monorepo - displayName: 'Prepare environment' - workingDirectory: '$(Build.SourcesDirectory)/regenerated/' - - script: | + git fetch origin + git checkout ${{ package.branchName }} autorest ./swagger/README.md --use=$(Build.SourcesDirectory) displayName: 'Regenerate target package ${{ package.name }}' workingDirectory: '$(Build.SourcesDirectory)/regenerated/sdk/${{ package.service }}/${{ package.name }}' From b9b25e6a2c59ea2d2f80724cb62c352f2532a2ed Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 1 Mar 2022 16:44:16 -0500 Subject: [PATCH 5/7] remove other tests --- eng/pipelines/ci.yml | 146 +------------------------------------------ 1 file changed, 1 insertion(+), 145 deletions(-) diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index 9dee4a8f12e..c39f2dfcb33 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -66,151 +66,7 @@ jobs: npm install -g autorest npm install displayName: 'Prepare Environment for Generation' - - script: | - pylint autorest - displayName: 'Pylint' - - script: | - mypy autorest - displayName: 'Mypy' - - script: | - pytest test/unittests - displayName: 'Unit tests' - - script: | - inv regenerate - displayName: 'Regenerate Code' - - script: | - git add -A # 'add' first so 'diff' includes untracked files - git diff --staged -w - displayName: 'Diff regeneration' - - task: UsePythonVersion@0 - displayName: 'Use Python $(PythonVersion)' - inputs: - versionSpec: $(PythonVersion) - - - script: | - pip install pip==20.2 - pip install tox coverage - displayName: "Install Env Specific Reqs in Target PyVersion $(PythonVersion)" - - script: | - cd $(TestFolder)/azure/legacy - tox -e ci - displayName: 'Execute legacy "azure" Tests - Python $(PythonVersion)' - - task: PublishTestResults@2 - condition: always() - displayName: 'Publish legacy "azure" Test Results' - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - legacy azure" - searchFolder: "$(TestFolder)/azure/legacy" - - - script: | - cd $(TestFolder)/azure/low-level - tox -e ci - displayName: 'Execute low-level "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - displayName: 'Publish low-level "azure" Test Results' - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - low-level azure" - searchFolder: "$(TestFolder)/azure/low-level" - - - script: | - cd $(TestFolder)/azure/version-tolerant - tox -e ci - displayName: 'Execute version-tolerant "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - displayName: 'Publish version-tolerant "azure" Test Results' - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant azure" - searchFolder: "$(TestFolder)/azure/version-tolerant" - - - script: | - cd $(TestFolder)/azure/version-tolerant - tox -e lint - displayName: 'Lint version-tolerant "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) - - - script: | - cd $(TestFolder)/vanilla/legacy - tox -e ci - displayName: 'Execute legacy "vanilla" Tests - Python $(PythonVersion)' - - task: PublishTestResults@2 - displayName: 'Publish legacy "vanilla" Test Results' - condition: always() - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - legacy vanilla" - searchFolder: "$(TestFolder)/vanilla/legacy" - - - script: | - cd $(TestFolder)/vanilla/low-level - tox -e ci - displayName: 'Execute low level "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - displayName: 'Publish low level "vanilla" Test Results' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - low level vanilla" - searchFolder: "$(TestFolder)/vanilla/low-level" - - - script: | - cd $(TestFolder)/vanilla/version-tolerant - tox -e ci - displayName: 'Execute version-tolerant "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - task: PublishTestResults@2 - displayName: 'Publish version-tolerant "vanilla" Test Results' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant vanilla" - searchFolder: "$(TestFolder)/vanilla/version-tolerant" - - - script: | - cd $(TestFolder)/vanilla/version-tolerant - tox -e lint - displayName: 'Lint version-tolerant "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) - - - script: | - cd $(TestFolder)/dpg/low-level - tox -e ci - displayName: 'Execute low level update "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - script: | - cd $(TestFolder)/dpg/version-tolerant - tox -e ci - displayName: 'Execute version-tolerant update "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) - - script: | - cd $(TestFolder)/dpg/version-tolerant - tox -e lint - displayName: 'Lint version-tolerant "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7')) - - script: | - cd $(TestFolder)/multiapi - tox -e ci - displayName: 'Execute "multiapi" Tests - Python $(PythonVersion)' - - task: PublishTestResults@2 - displayName: 'Publish "multiapi" Test Results' - condition: always() - inputs: - testRunTitle: "$(OSName) Python $(PythonVersion) - multiapi" - searchFolder: "$(TestFolder)/multiapi" - - - script: | - npm pack - AbsolutePkgPath=$(find "$(pwd)" -name "autorest-python-*" -maxdepth 1) - cd .. - npm install $AbsolutePkgPath - displayName: "Test tarball" - - - script: | - npm run coverage -- publish --repo=$(Build.Repository.Name) --ref=$(Build.SourceBranch) --githubToken=$(github-token) --azStorageAccount=$(storage-coverage-user) --azStorageAccessKey=$(storage-coverage-pass) --coverageDirectory=$(AUTOREST_TESTSERVER_COVERAGE_DIRECTORY) - workingDirectory: node_modules/@microsoft.azure/autorest.testserver - displayName: "Publish coverage report to storage account" - condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.10')) + - ${{ if eq(and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['PythonVersion'], '2.7')), 'True') }}: - script: | From b26bf8e56f0bd218e6e2b86af53c7807b10cb824 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 1 Mar 2022 17:10:07 -0500 Subject: [PATCH 6/7] try without depth flag --- eng/pipelines/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index c39f2dfcb33..61890692dd6 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -66,11 +66,11 @@ jobs: npm install -g autorest npm install displayName: 'Prepare Environment for Generation' - + - ${{ if eq(and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['PythonVersion'], '2.7')), 'True') }}: - script: | - git clone https://github.com/Azure/azure-sdk-for-python.git --depth=1 $(Build.SourcesDirectory)/regenerated/ + git clone https://github.com/Azure/azure-sdk-for-python.git $(Build.SourcesDirectory)/regenerated/ displayName: 'Clone python repo' - script: | From 23421b8cc7d18fe6bacd154fae1b021e38843f2d Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 1 Mar 2022 17:43:23 -0500 Subject: [PATCH 7/7] try with all storage --- eng/pipelines/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index 61890692dd6..f2f21e875e1 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -24,6 +24,15 @@ parameters: - name: azure-storage-blob service: storage branchName: feature/storage-autorest + - name: azure-storage-queue + service: storage + branchName: feature/storage-autorest + - name: azure-storage-file-datalake + service: storage + branchName: feature/storage-autorest + - name: azure-storage-file-share + service: storage + branchName: feature/storage-autorest jobs: - job: "AutoRest_Python_CI"