From a3fce4f5847fc4d1727671c38ad08b3da811acd6 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Fri, 15 Nov 2024 10:27:37 -0800 Subject: [PATCH] Add Docs variables to globals.yml instead of needlessly passing them around --- eng/pipelines/docindex.yml | 2 -- .../templates/stages/archetype-net-release.yml | 10 ++++------ .../templates/stages/archetype-sdk-client.yml | 8 -------- eng/pipelines/templates/variables/globals.yml | 4 ++++ 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/eng/pipelines/docindex.yml b/eng/pipelines/docindex.yml index 325cdb9ba9c6..8a23b814f407 100644 --- a/eng/pipelines/docindex.yml +++ b/eng/pipelines/docindex.yml @@ -16,8 +16,6 @@ jobs: name: $(LINUXPOOL) variables: DocRepoLocation: $(Pipeline.Workspace)/docs - DocRepoOwner: Azure - DocRepoName: azure-docs-sdk-dotnet steps: # Checkout the eng folder from the SDK repo - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml diff --git a/eng/pipelines/templates/stages/archetype-net-release.yml b/eng/pipelines/templates/stages/archetype-net-release.yml index 06be144e9aa5..39dd8bb3976d 100644 --- a/eng/pipelines/templates/stages/archetype-net-release.yml +++ b/eng/pipelines/templates/stages/archetype-net-release.yml @@ -4,8 +4,6 @@ parameters: ArtifactName: 'not-specified' # Publish to https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net DevOpsFeedId: '29ec6040-b234-4e31-b139-33dc4287b756/fa8c16a3-dbe0-4de2-a297-03065ec1ba3f' - TargetDocRepoOwner: 'not-specified' - TargetDocRepoName: 'not-specified' stages: @@ -208,8 +206,8 @@ stages: PackageInfoLocations: - $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json WorkingDirectory: $(System.DefaultWorkingDirectory) - TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}} - TargetDocRepoName: ${{parameters.TargetDocRepoName}} + TargetDocRepoOwner: $(DocRepoOwner) + TargetDocRepoName: $(DocRepoName) Language: 'dotnet' SparseCheckoutPaths: - /api/overview/azure/ @@ -342,8 +340,8 @@ stages: - ${{if ne(artifact.skipPublishDocMs, 'true')}}: - $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json WorkingDirectory: $(System.DefaultWorkingDirectory) - TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}} - TargetDocRepoName: ${{parameters.TargetDocRepoName}} + TargetDocRepoOwner: $(DocRepoOwner) + TargetDocRepoName: $(DocRepoName) Language: 'dotnet' DailyDocsBuild: true SparseCheckoutPaths: diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index d8b4e97dc03e..fd1ac577493c 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -14,12 +14,6 @@ parameters: - name: ServiceDirectory type: string default: not-specified - - name: TargetDocRepoOwner - type: string - default: Azure - - name: TargetDocRepoName - type: string - default: azure-docs-sdk-dotnet - name: BuildSnippets type: boolean default: true @@ -111,6 +105,4 @@ extends: ${{ if eq(parameters.ServiceDirectory, 'template') }}: TestPipeline: true ArtifactName: packages - TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }} - TargetDocRepoName: ${{ parameters.TargetDocRepoName }} diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index 32a6ff4bd6ee..25aaecd6e41f 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -18,3 +18,7 @@ variables: # Define optional AdditionalTestFilters via pipeline runtime variables or matrix config variables # See https://docs.microsoft.com/dotnet/core/testing/selective-unit-tests?pivots=nunit AdditionalTestFilters: "Placeholder!=DefaultIgnoreMe" + + # Docs publishing variables for repo/owner + DocRepoOwner: 'Azure' + DocRepoName: 'azure-docs-sdk-dotnet'