Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
experimenting further
  • Loading branch information
kushagraThapar committed Dec 8, 2023
commit 3f2c820d721e7cc155131e9b3235a5f8aa9aa77a
149 changes: 123 additions & 26 deletions eng/pipelines/templates/stages/cosmos-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,112 @@ parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: EmulatorMsiUrl
- name: TestPipeline
type: boolean
default: false
- name: BeforeTestSteps
type: object
default: []
- name: AfterTestSteps
type: object
default: []
- name: BeforePublishSteps
type: object
default: []
- name: TestMarkArgument
type: string
default: https://aka.ms/cosmosdb-emulator
default: ''
- name: BuildTargetingString
type: string
default: azure-*
- name: TestTimeoutInMinutes
type: number
default: 60
- name: ToxEnvParallel
type: string
default: --tenvparallel
- name: InjectedPackages
type: string
default: ''
- name: EmulatorStartParameters
- name: BuildDocs
type: boolean
default: true
- name: DevFeedName
type: string
default: ''
default: public/azure-sdk-for-python
- name: TargetDocRepoOwner
type: string
default: MicrosoftDocs
- name: TargetDocRepoName
type: string
default: azure-docs-sdk-python
- name: MatrixConfigs
type: object
default:
- Name: Python_ci_test_base
Path: eng/pipelines/templates/stages/platform-matrix.json
Selection: sparse
GenerateVMJobs: true
- name: AdditionalMatrixConfigs
type: object
default: []
- name: MatrixFilters
type: object
default: []
- name: MatrixReplace
type: object
default: []
- name: VerifyAutorest
type: boolean
default: false
- name: ValidateFormatting
type: boolean
default: false
- name: TestProxy
type: boolean
default: false
- name: GenerateApiReviewForManualOnly
type: boolean
default: false
- name: AdvancedBuild
type: boolean
default: false

variables:
- template: /eng/pipelines/templates/variables/globals.yml

stages:
- stage: Build
jobs:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
- template: /eng/pipelines/templates/jobs/ci.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
# Skip emulator tests in the CI run
# TestMarkArgument: not cosmosEmulator
InjectedPackages: ${{parameters.InjectedPackages}}
Artifacts: ${{parameters.Artifacts}}

Artifacts: ${{ parameters.Artifacts }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
BeforeTestSteps: ${{ parameters.BeforeTestSteps }}
AfterTestSteps: ${{ parameters.AfterTestSteps }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}
BuildTargetingString: '${{ parameters.BuildTargetingString }}'
TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}
ToxEnvParallel: ${{ parameters.ToxEnvParallel }}
InjectedPackages: ${{ parameters.InjectedPackages }}
BuildDocs: ${{ parameters.BuildDocs }}
DevFeedName: ${{ parameters.DevFeedName }}
MatrixConfigs:
- ${{ each config in parameters.MatrixConfigs }}:
- ${{ config }}
- ${{ each config in parameters.AdditionalMatrixConfigs }}:
- ${{ config }}
MatrixFilters: ${{ parameters.MatrixFilters }}
MatrixReplace: ${{ parameters.MatrixReplace }}
VerifyAutorest: ${{ parameters.VerifyAutorest }}
ValidateFormatting: ${{ parameters.ValidateFormatting }}
TestProxy: ${{ parameters.TestProxy }}
GenerateApiReviewForManualOnly: ${{ parameters.GenerateApiReviewForManualOnly }}
AdvancedBuild: ${{ parameters.AdvancedBuild }}

- stage: Test_Emulator
dependsOn: []
jobs:
Expand All @@ -54,21 +136,36 @@ stages:
OSVmImage: 'windows-2022'
PythonVersion: '3.12'

pool:
vmImage: $(OSVmImage)
pool:
vmImage: $(OSVmImage)

steps:
- template: /eng/common/pipelines/templates/steps/cosmos-emulator.yml
parameters:
StartParameters: '/noexplorer /noui /enablepreview /EnableSqlComputeEndpoint /SqlComputePort=9999 /disableratelimiting /partitioncount=50 /consistency=Strong'

steps:
- template: /eng/common/pipelines/templates/steps/cosmos-emulator.yml
parameters:
StartParameters: '/noexplorer /noui /enablepreview /EnableSqlComputeEndpoint /SqlComputePort=9999 /disableratelimiting /partitioncount=50 /consistency=Strong'
- template: /eng/pipelines/templates/steps/build-test.yml
parameters:
TestMarkArgument: not globaldb
EnvVars:
ACCOUNT_HOST: https://localhost:8081/
ServiceDirectory: ${{ parameters.ServiceDirectory }}
PythonVersion: $(PythonVersion)
OSVmImage: $(OSVmImage)
ToxTestEnv: 'whl,sdist'
InjectedPackages: ${{parameters.InjectedPackages}}

- template: /eng/pipelines/templates/steps/build-test.yml
parameters:
TestMarkArgument: not globaldb
EnvVars:
ACCOUNT_HOST: https://localhost:8081/
ServiceDirectory: ${{ parameters.ServiceDirectory }}
PythonVersion: $(PythonVersion)
OSVmImage: $(OSVmImage)
ToxTestEnv: 'whl,sdist'
InjectedPackages: ${{parameters.InjectedPackages}}
# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
- template: archetype-python-release.yml
parameters:
DependsOn: Build
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
ArtifactName: packages_extended
DocArtifact: documentation
TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }}
TargetDocRepoName: ${{ parameters.TargetDocRepoName }}
DevFeedName: ${{ parameters.DevFeedName }}