From 5a129f2e12f38767a128f1d4f771dad877951270 Mon Sep 17 00:00:00 2001 From: Nick Tripician Date: Mon, 11 May 2026 15:43:28 -0700 Subject: [PATCH] Split fork-runnable CI from live-account CI (#5298 follow-up) The MultiRegion and MultiMaster EmulatorTests jobs were causing every fork PR to red-X two required checks because Azure DevOps does not mount secret variables (COSMOSDB_MULTI_REGION, COSMOSDB_MULTIMASTER) on builds triggered by fork PRs. With the connection strings arriving empty, the CosmosClient constructor failed before any test logic ran. Following the same pattern used by azure-sdk-for-rust, azure-sdk-for-java, and azure-sdk-for-python, the live-account jobs are now structurally separated: * templates/build-test.yml: no longer defines or accepts live-account parameters. Public/fork PR pipeline (azure-pipelines.yml) consumes only this template now and is fully fork-safe. * templates/build-test-live.yml (new): contains just the two live-account jobs (MultiRegion, MultiMaster), parameterized by the connection-string secrets. * azure-pipelines-live-account.yml (new): on-demand top-level pipeline invoking build-test-live.yml. Configured (via ADO UI) to require a team-member /azp run comment to dispatch on fork PRs. * azure-pipelines-official.yml and azure-pipelines-rolling.yml now invoke both templates so the live-account tests still run on the release and rolling cadences with their existing secret access. CONTRIBUTING.md and docs/builds-and-pipelines.md document the new layout, the /azp run trigger for fork PRs, and the one-time ADO + GitHub configuration steps needed before this lands on main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CONTRIBUTING.md | 39 +++++++++++ azure-pipelines-live-account.yml | 68 +++++++++++++++++++ azure-pipelines-official.yml | 5 ++ azure-pipelines-rolling.yml | 18 ++++-- azure-pipelines.yml | 8 ++- docs/builds-and-pipelines.md | 44 ++++++++++++- templates/build-test-live.yml | 108 +++++++++++++++++++++++++++++++ templates/build-test.yml | 91 +++----------------------- 8 files changed, 291 insertions(+), 90 deletions(-) create mode 100644 azure-pipelines-live-account.yml create mode 100644 templates/build-test-live.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5a4ed58a6e..aee7b3199f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -99,6 +99,45 @@ When evaluating adding new tests, please search in the existing test files if th 1. Check for [test failures](#test-failures) and address them if they are not transient. 1. Review the **Checks** section to confirm there are no pending steps that might be blocking your work from merging. +### How CI works for pull requests from forks + +The repository's CI is split into two layers because Azure DevOps does not +expose secret variables (such as Cosmos DB connection strings) to builds +triggered by pull requests from forks. This is an Azure DevOps security +default, not a project-specific restriction. + +* **`dotnet-v3-ci`** ([`azure-pipelines.yml`](azure-pipelines.yml)) runs + automatically on every pull request, including fork PRs. It covers the + build, static analysis, unit tests, encryption tests, samples, CTL, + benchmarks, and all Emulator tests that do not require a live Cosmos + account. **Fork contributors can self-serve this entire pipeline.** + +* **`dotnet-v3-live-account`** ([`azure-pipelines-live-account.yml`](azure-pipelines-live-account.yml)) + runs the live-account tests (`MultiRegion`, `MultiMaster`) which depend on + the `COSMOSDB_MULTI_REGION` and `COSMOSDB_MULTIMASTER` secret variables. + It will **not** auto-run on a fork PR. A maintainer must comment + `/azp run dotnet-v3-live-account` on the PR to dispatch the run against + the PR's commit. + +If you are an external contributor and you see the `dotnet-v3-live-account` +check pending on your PR, that is expected. A maintainer will trigger it +once they have reviewed your change and are comfortable running it against +the team's Azure resources. You do **not** need to do anything to make this +work, and you cannot fix `dotnet-v3-live-account` failures from your fork +branch alone — if a maintainer has trusted the change but the live +checks fail, leave a comment and a maintainer can re-trigger after a fix. + +### Working on the pipeline split itself + +If you are changing the pipeline layout, keep this invariant: no template +referenced from `azure-pipelines.yml` may consume `$(COSMOSDB_MULTI_REGION)`, +`$(COSMOSDB_MULTIMASTER)`, or any other secret variable, and no job in those +templates may read those values out of `parameters`. Any new live-account +test should be added to [`templates/build-test-live.yml`](templates/build-test-live.yml) +and surfaced through [`azure-pipelines-live-account.yml`](azure-pipelines-live-account.yml) +plus the trusted internal pipelines (`azure-pipelines-official.yml`, +`azure-pipelines-rolling.yml`). + ### Test failures If the Pull Request is experiencing test failures, these will appear as failed checks: diff --git a/azure-pipelines-live-account.yml b/azure-pipelines-live-account.yml new file mode 100644 index 0000000000..95a1008efe --- /dev/null +++ b/azure-pipelines-live-account.yml @@ -0,0 +1,68 @@ +# File: azure-pipelines-live-account.yml +# +# On-demand "live-account" CI pipeline for the Microsoft.Azure.Cosmos SDK. +# Runs the MultiRegion and MultiMaster EmulatorTests, which require real +# Azure Cosmos DB connection-string secrets (COSMOSDB_MULTI_REGION, +# COSMOSDB_MULTIMASTER). +# +# WHY THIS PIPELINE EXISTS +# ------------------------ +# The default PR-validation pipeline (azure-pipelines.yml) runs on every pull +# request, including PRs opened from forks. Azure DevOps does not expose +# secret variables to builds triggered by fork PRs (a security default), so +# any job needing live-account secrets would fail on those builds. To avoid +# this, the live-account jobs were extracted into templates/build-test-live.yml +# and this pipeline is the only fork-eligible entry point that invokes them. +# +# HOW IT IS TRIGGERED +# ------------------- +# * Automatic on `main` and `releases/*` for code changes that could affect +# multi-region behavior (see the trigger block below). +# * Manually, for a specific pull request, by a team member commenting +# `/azp run dotnet-v3-live-account` on the PR. +# * It is also expected to be configured in the ADO pipeline UI with: +# - Build pull requests from forks: ON +# - Make secrets available to builds of forks: ON +# - Require a team member's comment before building a pull request: ON +# which together implement the "team member approval" gate. +# +# REQUIRED ADO PIPELINE VARIABLES (defined in the pipeline UI as SECRETS): +# * COSMOSDB_MULTI_REGION - connection string for the shared multi-region +# test account. +# * COSMOSDB_MULTIMASTER - connection string for the shared multi-master +# test account. +# +# Required GitHub branch protection: list the build status from this pipeline +# as a *required* check on `main` so no PR can merge without it being green. + +trigger: + branches: + include: + - main + - releases/* + paths: + include: + - 'Microsoft.Azure.Cosmos/src/**' + - 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/**' + - 'templates/build-test-live.yml' + - 'azure-pipelines-live-account.yml' + exclude: + - '*.md' + - 'docs/**/*' + - 'Microsoft.Azure.Cosmos/contracts/**/*' + +# `pr: none` keeps Azure DevOps from auto-running this pipeline on every PR. +# Maintainers trigger it on a PR with `/azp run dotnet-v3-live-account`. +pr: none + +variables: + ReleaseArguments: ' --filter "TestCategory!=Quarantine & TestCategory!=Ignore" --verbosity normal ' + VmImage: windows-latest + +jobs: +- template: templates/build-test-live.yml + parameters: + BuildConfiguration: Release + VmImage: $(VmImage) + MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION) + MultiRegionMultiMasterConnectionString: $(COSMOSDB_MULTIMASTER) diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index 76ba2919a3..7a896c9ed7 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -22,6 +22,11 @@ stages: BuildConfiguration: '${{ variables.BuildConfiguration }}' Arguments: '${{ variables.ReleaseArguments }}' VmImage: '${{ variables.VmImage }}' + + - template: templates/build-test-live.yml + parameters: + BuildConfiguration: '${{ variables.BuildConfiguration }}' + VmImage: '${{ variables.VmImage }}' MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION) MultiRegionMultiMasterConnectionString: $(COSMOSDB_MULTIMASTER) diff --git a/azure-pipelines-rolling.yml b/azure-pipelines-rolling.yml index 322afc5a0e..d9298b2804 100644 --- a/azure-pipelines-rolling.yml +++ b/azure-pipelines-rolling.yml @@ -27,20 +27,30 @@ jobs: BuildConfiguration: Release Arguments: $(ReleaseArguments) VmImage: $(VmImage) - MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION) - MultiRegionMultiMasterConnectionString: $(COSMOSDB_MULTIMASTER) IncludeEncryption: true IncludePerformance: true IncludeCoverage: true +- template: templates/build-test-live.yml + parameters: + BuildConfiguration: Release + VmImage: $(VmImage) + MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION) + MultiRegionMultiMasterConnectionString: $(COSMOSDB_MULTIMASTER) + - template: templates/build-test.yml parameters: BuildConfiguration: Release /p:IsPreview=true Arguments: $(ReleaseArguments) VmImage: $(VmImage) - MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION) - MultiRegionMultiMasterConnectionString: $(COSMOSDB_MULTIMASTER) IncludeEncryption: true IncludePerformance: true IncludeCoverage: true +- template: templates/build-test-live.yml + parameters: + BuildConfiguration: Release /p:IsPreview=true + VmImage: $(VmImage) + MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION) + MultiRegionMultiMasterConnectionString: $(COSMOSDB_MULTIMASTER) + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 862ad667ce..dedcdfe47c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,11 +50,15 @@ jobs: BuildConfiguration: Release Arguments: $(ReleaseArguments) VmImage: $(VmImage) - MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION) - MultiRegionMultiMasterConnectionString: $(COSMOSDB_MULTIMASTER) IncludePerformance: true IncludeCoverage: true +# NOTE: Live-account tests (MultiRegion, MultiMaster) intentionally do NOT run +# in this pipeline. They require the $(COSMOSDB_MULTI_REGION) and +# $(COSMOSDB_MULTIMASTER) secret variables, which Azure DevOps does not expose +# to fork-PR builds for security reasons. See azure-pipelines-live-account.yml +# and CONTRIBUTING.md for how those tests run. + - template: templates/build-internal.yml parameters: BuildConfiguration: Release diff --git a/docs/builds-and-pipelines.md b/docs/builds-and-pipelines.md index f514f34b50..cb9df70b1a 100644 --- a/docs/builds-and-pipelines.md +++ b/docs/builds-and-pipelines.md @@ -1,6 +1,6 @@ # Build pipelines for the Azure Cosmos DB .NET SDK -This repository contains 6 pipelines that are used on different scenarios. +This repository contains 7 pipelines that are used on different scenarios. ## PR Validation @@ -15,8 +15,22 @@ This repository contains 6 pipelines that are used on different scenarios. * [Verify the project builds with the PREVIEW flag, Unit tests for PREVIEW pass, Encryption and Benchmark projects for PREVIEW build](../templates/build-preview.yml) -> PREVIEW is used to ship the `-preview` SDK package. * [Verify the Benchmark project builds, including PREVIEW flag build](../templates/build-benchmark.yml) -> [Benchmark project](../Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/README.md) enables users to execute benchmark runs on their accounts. +This pipeline does **not** run live-account tests (`MultiRegion`, `MultiMaster`) because those require secret variables that Azure DevOps refuses to mount on builds triggered by pull requests from forks. The live-account jobs were intentionally extracted from [`templates/build-test.yml`](../templates/build-test.yml) into [`templates/build-test-live.yml`](../templates/build-test-live.yml) and are surfaced through the [Live account validation](#live-account-validation) pipeline described below. + This pipeline executes on Azure Pipelines as [dotnet-v3-ci](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=63). +## Live account validation + +[azure-pipelines-live-account.yml](../azure-pipelines-live-account.yml) runs the live-account EmulatorTests categories — `MultiRegion` and `MultiMaster` — via [`templates/build-test-live.yml`](../templates/build-test-live.yml). These jobs depend on the `$(COSMOSDB_MULTI_REGION)` and `$(COSMOSDB_MULTIMASTER)` secret variables. + +This pipeline is configured (in the Azure DevOps UI) so that: + +* It auto-runs on merges into `main` and `releases/*`. +* It does **not** auto-run on pull requests from forks. A team member must comment `/azp run dotnet-v3-live-account` on the PR to dispatch a run against the PR's commit. This is the same "team-member approval" pattern that `azure-sdk-for-rust`, `azure-sdk-for-java`, and `azure-sdk-for-python` use for live-test stages. +* It is listed in GitHub branch protection on `main` as a required status check, so no PR can merge without it having completed successfully on the head commit. + +This pipeline is expected to execute on Azure Pipelines as `dotnet-v3-live-account`. See [docs/builds-and-pipelines.md#manual-ado-setup](#manual-ado-setup) for the one-time ADO configuration required. + ## SDK release [azure-pipelines-official.yml](../azure-pipelines-official.yml) is used during the release process of a new version: @@ -71,3 +85,31 @@ This pipeline executes on Azure Pipelines as [dotnet-v3-encryption-release](http * Publish the package on the `cosmosdb/csharp/encryption.custom/` storage container. This pipeline executes on Azure Pipelines as [dotnet-v3-encryption-custom-release](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=67). + +## Manual ADO setup + +The [Live account validation](#live-account-validation) pipeline requires one-time configuration in Azure DevOps and GitHub that is not expressible in YAML. These steps are performed by a repository administrator the first time `azure-pipelines-live-account.yml` lands on `main`: + +1. **Create the pipeline definition in Azure DevOps.** + * In the `cosmos-db-sdk-public` ADO project, create a new pipeline named `dotnet-v3-live-account` that points at `azure-pipelines-live-account.yml` in this repository. +2. **Define the secret variables on that pipeline definition.** + * `COSMOSDB_MULTI_REGION` — connection string for the shared multi-region test Cosmos DB account, marked as secret. + * `COSMOSDB_MULTIMASTER` — connection string for the shared multi-master test Cosmos DB account, marked as secret. +3. **Configure the pipeline's "Pull request validation" settings (Triggers tab):** + * `Build pull requests from forks of this repository`: **ON** + * `Make secrets available to builds of forks`: **ON** + * `Require a team member's comment before building a pull request`: **ON** (this is what makes `/azp run` the required gate for fork PRs). +4. **Add the new pipeline as a required check in GitHub branch protection.** + * Go to *Settings -> Branches -> Branch protection rule for `main`* in GitHub. + * Add `dotnet-v3-live-account` to the list of required status checks. +5. **(Recommended) Verify the symmetric configuration on `dotnet-v3-ci`** (the public PR pipeline) just so the contract is explicit: + * `Build pull requests from forks of this repository`: **ON** + * `Make secrets available to builds of forks`: **OFF** + * `Require a team member's comment before building a pull request`: **OFF** +6. **Smoke test.** Open a throwaway fork PR and verify that: + * `dotnet-v3-ci` runs automatically and passes. + * `dotnet-v3-live-account` does **not** run automatically and shows as pending/required. + * Commenting `/azp run dotnet-v3-live-account` triggers the live pipeline and it succeeds. + +These steps are configuration of the Azure DevOps and GitHub services themselves and cannot be committed to the repository. Review them when this PR is merged. + diff --git a/templates/build-test-live.yml b/templates/build-test-live.yml new file mode 100644 index 0000000000..63fbb1a550 --- /dev/null +++ b/templates/build-test-live.yml @@ -0,0 +1,108 @@ +# File: templates/build-test-live.yml +# +# Live-account EmulatorTests (MultiRegion + MultiMaster). These tests require +# real Azure Cosmos DB connection strings (the $(COSMOSDB_MULTI_REGION) and +# $(COSMOSDB_MULTIMASTER) secret variables) and therefore CANNOT run on builds +# triggered by pull requests from forks, because Azure DevOps does not mount +# secret variables on fork-triggered builds by default. +# +# This template is referenced by: +# - azure-pipelines-official.yml (release pipeline; trusted) +# - azure-pipelines-rolling.yml (scheduled rolling pipeline; trusted) +# - azure-pipelines-live-account.yml (on-demand live tests for PRs; +# manually dispatched by a maintainer +# via an `/azp run` comment) +# +# Do NOT reference this template from the public PR pipeline +# (azure-pipelines.yml). That pipeline runs on fork PRs without secrets and +# the jobs below would fail-fast trying to construct a CosmosClient. + +parameters: + BuildConfiguration: '' + VmImage: '' # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops + OS: 'Windows' + MultiRegionConnectionString: '' + MultiRegionMultiMasterConnectionString: '' + MultiRegionArguments: ' --filter "TestCategory=MultiRegion" --verbosity normal ' + MultiMasterArguments: ' --filter "TestCategory=MultiMaster" --verbosity normal ' + MultiRegionCategoryListName: ' MultiRegion ' + MultiMasterCategoryListName: ' MultiMaster ' + +jobs: +- job: + displayName: EmulatorTests ${{ parameters.BuildConfiguration }} - ${{ parameters.MultiRegionCategoryListName }} + timeoutInMinutes: 60 + condition: and(succeeded(), eq('${{ parameters.OS }}', 'Windows')) + pool: + name: 'OneES' + + steps: + - checkout: self # self represents the repo where the initial Pipelines YAML file was found + clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching + + # Add this Command to Include the .NET 6 SDK + - task: UseDotNet@2 + displayName: Use .NET 6.0 + inputs: + packageType: 'runtime' + version: '6.x' + + - task: UseDotNet@2 + displayName: Use .NET 8.0 + inputs: + packageType: 'sdk' + version: '8.x' + + - task: DotNetCoreCLI@2 + displayName: Microsoft.Azure.Cosmos.EmulatorTests + retryCountOnTaskFailure: 2 + condition: succeeded() + inputs: + command: test + projects: 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/*.csproj' + arguments: ${{ parameters.MultiRegionArguments }} --configuration ${{ parameters.BuildConfiguration }} /p:OS=${{ parameters.OS }} + nugetConfigPath: NuGet.config + publishTestResults: true + testRunTitle: Microsoft.Azure.Cosmos.EmulatorTests + env: + COSMOSDB_MULTI_REGION: ${{ parameters.MultiRegionConnectionString }} + AZURE_COSMOS_NON_STREAMING_ORDER_BY_FLAG_DISABLED: true + +- job: + displayName: EmulatorTests ${{ parameters.BuildConfiguration }} - ${{ parameters.MultiMasterCategoryListName }} + timeoutInMinutes: 60 + condition: and(succeeded(), eq('${{ parameters.OS }}', 'Windows')) + pool: + name: 'OneES' + + steps: + - checkout: self # self represents the repo where the initial Pipelines YAML file was found + clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching + + # Add this Command to Include the .NET 6 SDK + - task: UseDotNet@2 + displayName: Use .NET 6.0 + inputs: + packageType: 'runtime' + version: '6.x' + + - task: UseDotNet@2 + displayName: Use .NET 8.0 + inputs: + packageType: 'sdk' + version: '8.x' + + - task: DotNetCoreCLI@2 + displayName: Microsoft.Azure.Cosmos.EmulatorTests + retryCountOnTaskFailure: 2 + condition: succeeded() + inputs: + command: test + projects: 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/*.csproj' + arguments: ${{ parameters.MultiMasterArguments }} --configuration ${{ parameters.BuildConfiguration }} /p:OS=${{ parameters.OS }} + nugetConfigPath: NuGet.config + publishTestResults: true + testRunTitle: Microsoft.Azure.Cosmos.EmulatorTests + env: + COSMOSDB_MULTI_REGION: ${{ parameters.MultiRegionMultiMasterConnectionString }} + AZURE_COSMOS_NON_STREAMING_ORDER_BY_FLAG_DISABLED: true diff --git a/templates/build-test.yml b/templates/build-test.yml index 48f46e29d4..4e5b301df8 100644 --- a/templates/build-test.yml +++ b/templates/build-test.yml @@ -5,16 +5,13 @@ parameters: Arguments: '' VmImage: '' # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops OS: 'Windows' + # Live-account categories (MultiRegion, MultiMaster) are NOT defined here. + # They live in templates/build-test-live.yml because they require Cosmos DB + # connection-string secrets that Azure DevOps does not mount on fork PR builds. EmulatorPipeline1Arguments: ' --filter "TestCategory!=Flaky & TestCategory!=Quarantine & TestCategory!=Functional & TestCategory!=ClientTelemetryRelease & TestCategory !=ThinClient & TestCategory!=LongRunning & TestCategory!=MultiRegion & TestCategory!=MultiMaster & (TestCategory=ClientTelemetryEmulator|TestCategory=Query|TestCategory=ReadFeed|TestCategory=Batch|TestCategory=ChangeFeed) & TestCategory!=Ignore" --verbosity normal ' EmulatorPipeline2Arguments: ' --filter "TestCategory!=Flaky & TestCategory!=Quarantine & TestCategory!=Functional & TestCategory!=ClientTelemetryRelease & TestCategory !=ThinClient & TestCategory!=ClientTelemetryEmulator & TestCategory!=Query & TestCategory!=ReadFeed & TestCategory!=Batch & TestCategory!=ChangeFeed & TestCategory!=LongRunning & TestCategory!=MultiRegion & TestCategory!=MultiMaster & TestCategory!=Ignore" --verbosity normal ' - EmulatorPipeline3Arguments: ' --filter "TestCategory=MultiRegion" --verbosity normal ' - EmulatorPipeline4Arguments: ' --filter "TestCategory=MultiMaster" --verbosity normal ' EmulatorPipeline1CategoryListName: ' Client Telemetry, Query, ChangeFeed, ReadFeed, Batch ' # Divided in 2 categories to run them in parallel and reduce the PR feedback time EmulatorPipeline2CategoryListName: ' Others ' - EmulatorPipeline3CategoryListName: ' MultiRegion ' - EmulatorPipeline4CategoryListName: ' MultiMaster ' - MultiRegionConnectionString : '' - MultiRegionMultiMasterConnectionString : '' IncludeEncryption: true IncludePerformance: true IncludeCoverage: true @@ -375,80 +372,8 @@ jobs: env: AZURE_COSMOS_NON_STREAMING_ORDER_BY_FLAG_DISABLED: true -- job: - displayName: EmulatorTests ${{ parameters.BuildConfiguration }} - ${{ parameters.EmulatorPipeline3CategoryListName }} - timeoutInMinutes: 60 - condition: and(succeeded(), eq('${{ parameters.OS }}', 'Windows')) - pool: - name: 'OneES' - - steps: - - checkout: self # self represents the repo where the initial Pipelines YAML file was found - clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching - - # Add this Command to Include the .NET 6 SDK - - task: UseDotNet@2 - displayName: Use .NET 6.0 - inputs: - packageType: 'runtime' - version: '6.x' - - - task: UseDotNet@2 - displayName: Use .NET 8.0 - inputs: - packageType: 'sdk' - version: '8.x' - - - task: DotNetCoreCLI@2 - displayName: Microsoft.Azure.Cosmos.EmulatorTests - retryCountOnTaskFailure: 2 - condition: succeeded() - inputs: - command: test - projects: 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/*.csproj' - arguments: ${{ parameters.EmulatorPipeline3Arguments }} --configuration ${{ parameters.BuildConfiguration }} /p:OS=${{ parameters.OS }} - nugetConfigPath: NuGet.config - publishTestResults: true - testRunTitle: Microsoft.Azure.Cosmos.EmulatorTests - env: - COSMOSDB_MULTI_REGION: ${{ parameters.MultiRegionConnectionString }} - AZURE_COSMOS_NON_STREAMING_ORDER_BY_FLAG_DISABLED: true - -- job: - displayName: EmulatorTests ${{ parameters.BuildConfiguration }} - ${{ parameters.EmulatorPipeline4CategoryListName }} - timeoutInMinutes: 60 - condition: and(succeeded(), eq('${{ parameters.OS }}', 'Windows')) - pool: - name: 'OneES' - - steps: - - checkout: self # self represents the repo where the initial Pipelines YAML file was found - clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching - - # Add this Command to Include the .NET 6 SDK - - task: UseDotNet@2 - displayName: Use .NET 6.0 - inputs: - packageType: 'runtime' - version: '6.x' - - - task: UseDotNet@2 - displayName: Use .NET 8.0 - inputs: - packageType: 'sdk' - version: '8.x' - - - task: DotNetCoreCLI@2 - displayName: Microsoft.Azure.Cosmos.EmulatorTests - retryCountOnTaskFailure: 2 - condition: succeeded() - inputs: - command: test - projects: 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/*.csproj' - arguments: ${{ parameters.EmulatorPipeline4Arguments }} --configuration ${{ parameters.BuildConfiguration }} /p:OS=${{ parameters.OS }} - nugetConfigPath: NuGet.config - publishTestResults: true - testRunTitle: Microsoft.Azure.Cosmos.EmulatorTests - env: - COSMOSDB_MULTI_REGION: ${{ parameters.MultiRegionMultiMasterConnectionString }} - AZURE_COSMOS_NON_STREAMING_ORDER_BY_FLAG_DISABLED: true \ No newline at end of file +# Live-account jobs (MultiRegion / MultiMaster) are intentionally NOT defined here. +# They have been moved to templates/build-test-live.yml so that the public PR +# pipeline (which runs on fork PRs without secret variables) does not host them. +# Internal pipelines (-official, -rolling, -live-account) invoke build-test-live.yml +# directly, passing the COSMOSDB_MULTI_REGION / COSMOSDB_MULTIMASTER secrets. \ No newline at end of file