diff --git a/eng/dailydocsconfig.json b/eng/docsSDKCIConfig.json similarity index 76% rename from eng/dailydocsconfig.json rename to eng/docsSDKCIConfig.json index 947b4169147d3..931905297aa14 100644 --- a/eng/dailydocsconfig.json +++ b/eng/docsSDKCIConfig.json @@ -2,12 +2,12 @@ "TFM": "net471", "target_repo": { "url": "https://github.com/Azure/azure-docs-sdk-dotnet", - "branch": "%%DailyDocsBranchName%%", + "branch": "%%DocsBranchName%%", "folder": "xml" }, "source_repo": { "url": "https://github.com/Azure/azure-docs-sdk-dotnet", - "branch": "%%DailyDocsBranchName%%", + "branch": "%%DocsBranchName%%", "csvPath": "bundlepackages" }, "import_content": true diff --git a/eng/pipelines/docindex.yml b/eng/pipelines/docindex.yml index 841f5ff139477..34f651252cf20 100644 --- a/eng/pipelines/docindex.yml +++ b/eng/pipelines/docindex.yml @@ -7,6 +7,12 @@ parameters: type: boolean default: true +- name: StartMainSDKCIRun + displayName: | + Kick off the main SDK CI docs run when manually running the pipeline + type: boolean + default: false + - name: ForceDailyUpdate displayName: | Force the daily branch update (includes starting daily branch run). @@ -114,6 +120,23 @@ jobs: TargetRepoOwner: $(DocRepoOwner) WorkingDirectory: $(DocRepoLocation) + - task: AzureCLI@2 + displayName: Queue Docs CI build for main branch + condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(${{ parameters.StartMainSDKCIRun }}, true))) + inputs: + azureSubscription: msdocs-apidrop-connection + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | + # Resource here is the Devops API scope + $accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv + $buildParamJson = (@{ params = (Get-Content ./eng/docsSDKCIConfig.json -Raw) -replace '%%DocsBranchName%%', "main" } | ConvertTo-Json) + eng/common/scripts/Queue-Pipeline.ps1 ` + -Organization "apidrop" ` + -Project "Content%20CI" ` + -DefinitionId 397 ` + -BuildParametersJson $buildParamJson ` + -BearerToken $accessToken # The scenario for running a Manual build is normally only for the main updates. The daily build # should really only get kicked off for scheduled runs. @@ -200,7 +223,7 @@ jobs: scriptLocation: inlineScript inlineScript: | $accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv - $buildParamJson = (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json) + $buildParamJson = (@{ params = (Get-Content ./eng/docsSDKCIConfig.json -Raw) -replace '%%DocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json) eng/common/scripts/Queue-Pipeline.ps1 ` -Organization "apidrop" ` -Project "Content%20CI" `