From d612dcb5677042b5d4adb7029d6059424b6d6445 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Wed, 3 May 2023 14:58:33 -0700 Subject: [PATCH] add new stage, comment existing stages --- tools/test-proxy/tests.yml | 394 +++++++++++++++++++++---------------- 1 file changed, 221 insertions(+), 173 deletions(-) diff --git a/tools/test-proxy/tests.yml b/tools/test-proxy/tests.yml index 310f326f8ba..e4366eb3a5e 100644 --- a/tools/test-proxy/tests.yml +++ b/tools/test-proxy/tests.yml @@ -4,171 +4,228 @@ variables: - template: /eng/pipelines/templates/variables/globals.yml stages: - - stage: IntegrationTests - displayName: "Asset Sync Integration Tests" - jobs: - - job: Solution_Integration_Test - - strategy: - matrix: - Windows: - Pool: 'azsdk-pool-mms-win-2022-general' - OS: 'Windows' - Linux: - Pool: azsdk-pool-mms-ubuntu-2204-general - OS: 'Linux' - Mac: - Pool: 'Azure Pipelines' - OS: 'Mac' - - pool: - name: $(Pool) - - steps: - - template: /eng/pipelines/templates/steps/install-dotnet.yml - - - script: 'dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) --filter "Category=Integration" --logger trx $(Build.SourcesDirectory)/tools/test-proxy/' - displayName: 'Test' - env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_MULTILEVEL_LOOKUP: 0 - GIT_TOKEN: $(azuresdk-github-pat) - GIT_COMMIT_OWNER: azure-sdk - GIT_COMMIT_EMAIL: azuresdk@microsoft.com - - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testResultsFiles: '**/*.trx' - testRunTitle: '$(OS) AssetSync tests against .NET' - testResultsFormat: 'VSTest' - mergeTestResults: true - - - job: CLI_Integration_Test - - strategy: - matrix: - Windows: - Pool: 'azsdk-pool-mms-win-2022-general' - OS: 'Windows' - Linux: - Pool: azsdk-pool-mms-ubuntu-2204-general - OS: 'Linux' - Mac: - Pool: 'Azure Pipelines' - OS: 'Mac' - - pool: - name: $(Pool) - - steps: - - template: /eng/pipelines/templates/steps/install-dotnet.yml - - - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml - parameters: - runProxy: false - rootFolder: $(Build.SourcesDirectory) - - - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml - parameters: - TargetTags: "Integration" - TargetDirectory: tools/test-proxy/scripts/test-scripts/ - EnvVars: - GIT_TOKEN: $(azuresdk-github-pat) - GIT_COMMIT_OWNER: azure-sdk - GIT_COMMIT_EMAIL: azuresdk@microsoft.com - - - job: Docker_CLI_Integration_Test - - pool: - name: azsdk-pool-mms-ubuntu-2204-general - - variables: - CLI_TEST_DOCKER_TAG: localproxyinstance - - steps: - - template: /eng/pipelines/templates/steps/install-dotnet.yml - - - pwsh: | - ./prepare.ps1 - - docker build -t $(CLI_TEST_DOCKER_TAG) . - workingDirectory: tools/test-proxy/docker/ - displayName: "Prepare and Build local docker image" - - - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml - parameters: - TargetTags: "Integration" - TargetDirectory: tools/test-proxy/scripts/test-scripts/ - EnvVars: - GIT_TOKEN: $(azuresdk-github-pat) - GIT_COMMIT_OWNER: azure-sdk - GIT_COMMIT_EMAIL: azuresdk@microsoft.com - CLI_TEST_WITH_DOCKER: true - CLI_TEST_DOCKER_TAG: $(CLI_TEST_DOCKER_TAG) - DISABLE_INTEGRATION_BRANCH_CLEANUP: true + # - stage: IntegrationTests + # displayName: "Asset Sync Integration Tests" + # jobs: + # - job: Solution_Integration_Test + + # strategy: + # matrix: + # Windows: + # Pool: 'azsdk-pool-mms-win-2022-general' + # OS: 'Windows' + # Linux: + # Pool: azsdk-pool-mms-ubuntu-2204-general + # OS: 'Linux' + # Mac: + # Pool: 'Azure Pipelines' + # OS: 'Mac' + + # pool: + # name: $(Pool) + + # steps: + # - template: /eng/pipelines/templates/steps/install-dotnet.yml + + # - script: 'dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) --filter "Category=Integration" --logger trx $(Build.SourcesDirectory)/tools/test-proxy/' + # displayName: 'Test' + # env: + # DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + # DOTNET_CLI_TELEMETRY_OPTOUT: 1 + # DOTNET_MULTILEVEL_LOOKUP: 0 + # GIT_TOKEN: $(azuresdk-github-pat) + # GIT_COMMIT_OWNER: azure-sdk + # GIT_COMMIT_EMAIL: azuresdk@microsoft.com + + # - task: PublishTestResults@2 + # condition: succeededOrFailed() + # inputs: + # testResultsFiles: '**/*.trx' + # testRunTitle: '$(OS) AssetSync tests against .NET' + # testResultsFormat: 'VSTest' + # mergeTestResults: true + + # - job: CLI_Integration_Test + + # strategy: + # matrix: + # Windows: + # Pool: 'azsdk-pool-mms-win-2022-general' + # OS: 'Windows' + # Linux: + # Pool: azsdk-pool-mms-ubuntu-2204-general + # OS: 'Linux' + # Mac: + # Pool: 'Azure Pipelines' + # OS: 'Mac' + + # pool: + # name: $(Pool) + + # steps: + # - template: /eng/pipelines/templates/steps/install-dotnet.yml + + # - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml + # parameters: + # runProxy: false + # rootFolder: $(Build.SourcesDirectory) + + # - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml + # parameters: + # TargetTags: "Integration" + # TargetDirectory: tools/test-proxy/scripts/test-scripts/ + # EnvVars: + # GIT_TOKEN: $(azuresdk-github-pat) + # GIT_COMMIT_OWNER: azure-sdk + # GIT_COMMIT_EMAIL: azuresdk@microsoft.com + + # - job: Docker_CLI_Integration_Test + + # pool: + # name: azsdk-pool-mms-ubuntu-2204-general + + # variables: + # CLI_TEST_DOCKER_TAG: localproxyinstance + + # steps: + # - template: /eng/pipelines/templates/steps/install-dotnet.yml + + # - pwsh: | + # ./prepare.ps1 + + # docker build -t $(CLI_TEST_DOCKER_TAG) . + # workingDirectory: tools/test-proxy/docker/ + # displayName: "Prepare and Build local docker image" + + # - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml + # parameters: + # TargetTags: "Integration" + # TargetDirectory: tools/test-proxy/scripts/test-scripts/ + # EnvVars: + # GIT_TOKEN: $(azuresdk-github-pat) + # GIT_COMMIT_OWNER: azure-sdk + # GIT_COMMIT_EMAIL: azuresdk@microsoft.com + # CLI_TEST_WITH_DOCKER: true + # CLI_TEST_DOCKER_TAG: $(CLI_TEST_DOCKER_TAG) + # DISABLE_INTEGRATION_BRANCH_CLEANUP: true - stage: RepoUnitTests displayName: Repo-Specific Unit Tests dependsOn: [] jobs: - - job: Test_JS_Utils - - strategy: - matrix: - Windows: - Pool: 'azsdk-pool-mms-win-2022-general' - OS: 'Windows' - Linux: - Pool: azsdk-pool-mms-ubuntu-2204-general - OS: 'Linux' - Mac: - Pool: 'Azure Pipelines' - OS: 'Mac' - - pool: - name: $(Pool) - - variables: - REPO: "Azure/azure-sdk-for-js" - CLONE_LOCATION: "$(Agent.BuildDirectory)/js_repo" - - steps: - - template: /eng/pipelines/templates/steps/install-dotnet.yml - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Use Node 16.x" - - - pwsh: | - git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 - displayName: Clone Repo - - - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml - parameters: - runProxy: true - rootFolder: $(CLONE_LOCATION) - - - pwsh: | - npm install -g @microsoft/rush@5.48.0 - rush update - rush build -t . - displayName: 'Install Rush, build and install proxy tests project' - workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder - env: - PROXY_MANUAL_START: "true" - - - pwsh: | - rushx test:node - displayName: 'Invoke Tests' - workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder - env: - PROXY_MANUAL_START: "true" + # - job: Test_JS_Utils + + # displayName: Invoke JS Utils CI + + # strategy: + # matrix: + # Windows: + # Pool: 'azsdk-pool-mms-win-2022-general' + # OS: 'Windows' + # Linux: + # Pool: azsdk-pool-mms-ubuntu-2204-general + # OS: 'Linux' + # Mac: + # Pool: 'Azure Pipelines' + # OS: 'Mac' + + # pool: + # name: $(Pool) + + # variables: + # REPO: "Azure/azure-sdk-for-js" + # CLONE_LOCATION: "$(Agent.BuildDirectory)/js_repo" + + # steps: + # - template: /eng/pipelines/templates/steps/install-dotnet.yml + + # - task: NodeTool@0 + # inputs: + # versionSpec: "16.x" + # displayName: "Use Node 16.x" + + # - pwsh: | + # git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 + # displayName: Clone Repo + + # - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml + # parameters: + # runProxy: true + # rootFolder: $(CLONE_LOCATION) + + # - pwsh: | + # npm install -g @microsoft/rush@5.48.0 + # rush update + # rush build -t . + # displayName: 'Install Rush, build and install proxy tests project' + # workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder + # env: + # PROXY_MANUAL_START: "true" + + # - pwsh: | + # rushx test:node + # displayName: 'Invoke Tests' + # workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder + # env: + # PROXY_MANUAL_START: "true" + + # - job: Test_Java_Core + + # displayName: Run Java Core Local + + # strategy: + # matrix: + # Windows: + # Pool: 'azsdk-pool-mms-win-2022-general' + # OS: 'Windows' + # Linux: + # Pool: azsdk-pool-mms-ubuntu-2204-general + # OS: 'Linux' + # Mac: + # Pool: 'Azure Pipelines' + # OS: 'Mac' + + # pool: + # name: $(Pool) + + # variables: + # REPO: "Azure/azure-sdk-for-python" + # CLONE_LOCATION: "$(Agent.BuildDirectory)/python_repo" + + # steps: + # - template: /eng/pipelines/templates/steps/install-dotnet.yml + + # - template: /eng/pipelines/templates/steps/use-python-version.yml + # parameters: + # versionSpec: '3.9' + + # - pwsh: | + # git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 + # displayName: Clone Repo + + # - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml + # parameters: + # runProxy: true + # rootFolder: $(CLONE_LOCATION) + + # - pwsh: | + # python -m pip install -r dev_requirements.txt + # python -m pip install . + # displayName: 'Install requirements and package' + # workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ + + # - pwsh: | + # pytest . + # displayName: 'Invoke Tests' + # workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ + # env: + # PROXY_URL: "http://localhost:5000" + # PROXY_MANUAL_START: true - job: Test_Python_Tables + displayName: Run Python Tables CI + strategy: matrix: Windows: @@ -185,8 +242,8 @@ stages: name: $(Pool) variables: - REPO: "Azure/azure-sdk-for-python" - CLONE_LOCATION: "$(Agent.BuildDirectory)/python_repo" + REPO: "Azure/azure-sdk-for-java" + CLONE_LOCATION: "$(Agent.BuildDirectory)/java_repo" steps: - template: /eng/pipelines/templates/steps/install-dotnet.yml @@ -199,21 +256,12 @@ stages: git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 displayName: Clone Repo - - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml - parameters: - runProxy: true - rootFolder: $(CLONE_LOCATION) - - pwsh: | - python -m pip install -r dev_requirements.txt - python -m pip install . - displayName: 'Install requirements and package' - workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ + mvn install -f sdk/core/azure-core-test/pom.xml -DskipTests=true -DskipCheckStyle=true + displayName: 'Install azure-core-test' + workingDirectory: $(CLONE_LOCATION) - pwsh: | - pytest . + mvn surefire:test -f sdk/core/azure-core-test/pom.xml displayName: 'Invoke Tests' - workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ - env: - PROXY_URL: "http://localhost:5000" - PROXY_MANUAL_START: true \ No newline at end of file + workingDirectory: $(CLONE_LOCATION)