# cSpell:ignore pscore
# cSpell:ignore issecret
trigger: none

extends:
    template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
    parameters:
      Location: westus2
      PersistOidcToken: true
      ServiceDirectory: identity
      EnvVars:
        AZURE_CLIENT_ID: $(IDENTITY_SP_CLIENT_ID)
        AZURE_CLIENT_SECRET: $(IDENTITY_SP_CLIENT_SECRET)
        AZURE_TENANT_ID: $(IDENTITY_SP_TENANT_ID)
        PEM_CONTENT: $(python-identity-certificate)
        AZURE_TEST_RUN_LIVE: true
        AZURE_SKIP_LIVE_RECORDING: 'True'
        AZURE_SKIP_SP_LIVE_TESTS: 'True'
      CloudConfig:
        Public:
          SubscriptionConfigurations:
            - $(sub-config-identity-test-resources)
      ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
          # Test Managed Identity integrations tests on weekly tests pipeline.
          AdditionalMatrixConfigs:
            - Name: managed_identity_matrix
              Path: sdk/identity/platform-matrix-integration.json
              Selection: sparse
              GenerateVMJobs: true
