|
1 | 1 | trigger: none |
2 | 2 |
|
| 3 | +parameters: |
| 4 | +- name: UpdateMain |
| 5 | + displayName: | |
| 6 | + Update main branch. |
| 7 | + type: boolean |
| 8 | + default: true |
| 9 | + |
| 10 | +- name: ForceDailyUpdate |
| 11 | + displayName: | |
| 12 | + Force the daily branch update (includes starting daily branch run). |
| 13 | + type: boolean |
| 14 | + default: false |
| 15 | + |
| 16 | + |
3 | 17 | variables: |
4 | 18 | - template: /eng/pipelines/templates/variables/globals.yml |
5 | 19 | - template: /eng/pipelines/templates/variables/image.yml |
@@ -44,144 +58,152 @@ jobs: |
44 | 58 |
|
45 | 59 | - template: /eng/common/pipelines/templates/steps/set-default-branch.yml |
46 | 60 |
|
47 | | - - task: Powershell@2 |
48 | | - inputs: |
49 | | - pwsh: true |
50 | | - filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1 |
51 | | - arguments: -DocRepoLocation $(DocRepoLocation) |
52 | | - displayName: Move deprecated packages to legacy moniker |
53 | | - condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true'))) |
54 | | - |
55 | | - - task: Powershell@2 |
56 | | - inputs: |
57 | | - pwsh: true |
58 | | - filePath: eng/common/scripts/Update-DocsMsPackages.ps1 |
59 | | - arguments: -DocRepoLocation $(DocRepoLocation) |
60 | | - displayName: Update Docs Onboarding for main branch |
61 | | - condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true'))) |
62 | | - - task: Powershell@2 |
63 | | - inputs: |
64 | | - pwsh: true |
65 | | - filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1 |
66 | | - arguments: >- |
67 | | - -DocRepoLocation $(DocRepoLocation) |
68 | | - -ReadmeFolderRoot 'api/overview/azure' |
69 | | - displayName: Generate Service Level Readme for main branch |
70 | | - condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true'))) |
71 | | - - task: Powershell@2 |
72 | | - inputs: |
73 | | - pwsh: true |
74 | | - filePath: eng/common/scripts/Update-DocsMsToc.ps1 |
75 | | - arguments: >- |
76 | | - -DocRepoLocation $(DocRepoLocation) |
77 | | - -OutputLocation $(DocRepoLocation)/docs-ref-toc/reference-unified.yml |
78 | | - -ReadmeFolderRoot "api/overview/azure" |
79 | | - displayName: Generate ToC for main branch |
80 | | - condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true'))) |
81 | | - |
82 | | - - task: Powershell@2 |
83 | | - inputs: |
84 | | - pwsh: true |
85 | | - filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1 |
86 | | - arguments: >- |
87 | | - -DocRepoLocation $(DocRepoLocation) |
88 | | - displayName: Verify Required Docs Json Members |
89 | | - |
90 | | - - template: /eng/common/pipelines/templates/steps/git-push-changes.yml |
91 | | - parameters: |
92 | | - BaseRepoBranch: $(DefaultBranch) |
93 | | - BaseRepoOwner: $(DocRepoOwner) |
94 | | - CommitMsg: "Update docs CI configuration" |
95 | | - TargetRepoName: $(DocRepoName) |
96 | | - TargetRepoOwner: $(DocRepoOwner) |
97 | | - WorkingDirectory: $(DocRepoLocation) |
98 | | - |
99 | | - # Prepare daily docs CI |
100 | | - - template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml |
101 | | - parameters: |
102 | | - DailyBranchVariableName: DailyDocsBranchName |
103 | | - - pwsh: | |
104 | | - $ErrorActionPreference = "Continue" |
105 | | - git checkout "origin/$(DailyDocsBranchName)" 2>&1 | Out-Null |
106 | | - $LASTEXITCODE = 0 # This ignores any error from git checkout |
107 | | - git status |
108 | | - displayName: Checkout daily branch if it exists |
109 | | - workingDirectory: $(DocRepoLocation) |
110 | | -
|
111 | | - - pwsh: | |
112 | | - $publicFeedUrl = "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" |
113 | | - Write-Host "##vso[task.setvariable variable=PackageSourceOverride]$publicFeedUrl" |
114 | | - displayName: Set package source variable |
115 | | - workingDirectory: $(DocRepoLocation) |
116 | | -
|
117 | | - - task: Powershell@2 |
118 | | - inputs: |
119 | | - pwsh: true |
120 | | - filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1 |
121 | | - arguments: -DocRepoLocation $(DocRepoLocation) |
122 | | - displayName: Move deprecated packages to legacy moniker |
123 | | - condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true'))) |
124 | | - |
125 | | - - task: Powershell@2 |
126 | | - inputs: |
127 | | - pwsh: true |
128 | | - filePath: eng/common/scripts/Update-DocsMsPackages.ps1 |
129 | | - # Use the dotnet public daily package preview feed as the source for |
130 | | - # updated packages. |
131 | | - arguments: > |
132 | | - -DocRepoLocation $(DocRepoLocation) |
133 | | - -PackageSourceOverride $(PackageSourceOverride) |
134 | | - displayName: Update Docs Onboarding for Daily docs |
135 | | - - task: Powershell@2 |
136 | | - inputs: |
137 | | - pwsh: true |
138 | | - filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1 |
139 | | - arguments: >- |
140 | | - -DocRepoLocation $(DocRepoLocation) |
141 | | - -ReadmeFolderRoot 'api/overview/azure' |
142 | | - displayName: Generate Service Level Readme for Daily docs |
143 | | - - task: Powershell@2 |
144 | | - inputs: |
145 | | - pwsh: true |
146 | | - filePath: eng/common/scripts/Update-DocsMsToc.ps1 |
147 | | - arguments: >- |
148 | | - -DocRepoLocation $(DocRepoLocation) |
149 | | - -OutputLocation $(DocRepoLocation)/docs-ref-toc/reference-unified.yml |
150 | | - -ReadmeFolderRoot "api/overview/azure" |
151 | | - -PackageSourceOverride $(PackageSourceOverride) |
152 | | - displayName: Generate ToC for Daily docs |
153 | | - |
154 | | - - task: Powershell@2 |
155 | | - inputs: |
156 | | - pwsh: true |
157 | | - filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1 |
158 | | - arguments: >- |
159 | | - -DocRepoLocation $(DocRepoLocation) |
160 | | - displayName: Verify Required Docs Json Members |
161 | | - |
162 | | - - template: /eng/common/pipelines/templates/steps/git-push-changes.yml |
163 | | - parameters: |
164 | | - BaseRepoBranch: $(DailyDocsBranchName) |
165 | | - BaseRepoOwner: $(DocRepoOwner) |
166 | | - CommitMsg: "Update targeting packages based on release metadata. (Daily docs)" |
167 | | - TargetRepoName: $(DocRepoName) |
168 | | - TargetRepoOwner: $(DocRepoOwner) |
169 | | - WorkingDirectory: $(DocRepoLocation) |
170 | | - ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts |
171 | | - PushArgs: -f |
172 | | - |
173 | | - - task: AzureCLI@2 |
174 | | - displayName: Queue Docs CI build |
175 | | - inputs: |
176 | | - azureSubscription: msdocs-apidrop-connection |
177 | | - scriptType: pscore |
178 | | - scriptLocation: inlineScript |
179 | | - inlineScript: | |
180 | | - $accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv |
181 | | - $buildParamJson = (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json) |
182 | | - eng/common/scripts/Queue-Pipeline.ps1 ` |
183 | | - -Organization "apidrop" ` |
184 | | - -Project "Content%20CI" ` |
185 | | - -DefinitionId 397 ` |
186 | | - -BuildParametersJson $buildParamJson ` |
187 | | - -BearerToken $accessToken |
| 61 | + # Updating main is the default reason to kick off manual builds of the docIndex run. |
| 62 | + # Manual builds of docIndex are typically done to update Main when certain updates are |
| 63 | + # made. These updates include new libraries and CSV updates in azure-sdk which, depending |
| 64 | + # on the column(s) updated can cause anything from package deprecation to service level |
| 65 | + # readme or ToC updates. |
| 66 | + - ${{ if or(eq(variables['Build.Reason'], 'Schedule'), parameters.UpdateMain) }}: |
| 67 | + - task: Powershell@2 |
| 68 | + inputs: |
| 69 | + pwsh: true |
| 70 | + filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1 |
| 71 | + arguments: >- |
| 72 | + -DocRepoLocation $(DocRepoLocation) |
| 73 | + displayName: Verify Required Docs Json Members |
| 74 | + |
| 75 | + - task: Powershell@2 |
| 76 | + inputs: |
| 77 | + pwsh: true |
| 78 | + filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1 |
| 79 | + arguments: -DocRepoLocation $(DocRepoLocation) |
| 80 | + displayName: Move deprecated packages to legacy moniker |
| 81 | + |
| 82 | + - task: Powershell@2 |
| 83 | + inputs: |
| 84 | + pwsh: true |
| 85 | + filePath: eng/common/scripts/Update-DocsMsPackages.ps1 |
| 86 | + arguments: -DocRepoLocation $(DocRepoLocation) |
| 87 | + displayName: Update Docs Onboarding for main branch |
| 88 | + |
| 89 | + - task: Powershell@2 |
| 90 | + inputs: |
| 91 | + pwsh: true |
| 92 | + filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1 |
| 93 | + arguments: >- |
| 94 | + -DocRepoLocation $(DocRepoLocation) |
| 95 | + -ReadmeFolderRoot 'api/overview/azure' |
| 96 | + displayName: Generate Service Level Readme for main branch |
| 97 | + |
| 98 | + - task: Powershell@2 |
| 99 | + inputs: |
| 100 | + pwsh: true |
| 101 | + filePath: eng/common/scripts/Update-DocsMsToc.ps1 |
| 102 | + arguments: >- |
| 103 | + -DocRepoLocation $(DocRepoLocation) |
| 104 | + -OutputLocation $(DocRepoLocation)/docs-ref-toc/reference-unified.yml |
| 105 | + -ReadmeFolderRoot "api/overview/azure" |
| 106 | + displayName: Generate ToC for main branch |
| 107 | + |
| 108 | + - template: /eng/common/pipelines/templates/steps/git-push-changes.yml |
| 109 | + parameters: |
| 110 | + BaseRepoBranch: $(DefaultBranch) |
| 111 | + BaseRepoOwner: $(DocRepoOwner) |
| 112 | + CommitMsg: "Update docs CI configuration" |
| 113 | + TargetRepoName: $(DocRepoName) |
| 114 | + TargetRepoOwner: $(DocRepoOwner) |
| 115 | + WorkingDirectory: $(DocRepoLocation) |
| 116 | + |
| 117 | + |
| 118 | + # The scenario for running a Manual build is normally only for the main updates. The daily build |
| 119 | + # should really only get kicked off for scheduled runs. |
| 120 | + - ${{ if or(eq(variables['Build.Reason'], 'Schedule'), parameters.ForceDailyUpdate) }}: |
| 121 | + - template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml |
| 122 | + parameters: |
| 123 | + DailyBranchVariableName: DailyDocsBranchName |
| 124 | + - pwsh: | |
| 125 | + $ErrorActionPreference = "Continue" |
| 126 | + git checkout "origin/$(DailyDocsBranchName)" 2>&1 | Out-Null |
| 127 | + $LASTEXITCODE = 0 # This ignores any error from git checkout |
| 128 | + git status |
| 129 | + displayName: Checkout daily branch if it exists |
| 130 | + workingDirectory: $(DocRepoLocation) |
| 131 | +
|
| 132 | + - pwsh: | |
| 133 | + $publicFeedUrl = "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" |
| 134 | + Write-Host "##vso[task.setvariable variable=PackageSourceOverride]$publicFeedUrl" |
| 135 | + displayName: Set package source variable |
| 136 | + workingDirectory: $(DocRepoLocation) |
| 137 | +
|
| 138 | + - task: Powershell@2 |
| 139 | + inputs: |
| 140 | + pwsh: true |
| 141 | + filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1 |
| 142 | + arguments: >- |
| 143 | + -DocRepoLocation $(DocRepoLocation) |
| 144 | + displayName: Verify Required Docs Json Members |
| 145 | + |
| 146 | + - task: Powershell@2 |
| 147 | + inputs: |
| 148 | + pwsh: true |
| 149 | + filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1 |
| 150 | + arguments: -DocRepoLocation $(DocRepoLocation) |
| 151 | + displayName: Move deprecated packages to legacy moniker |
| 152 | + |
| 153 | + - task: Powershell@2 |
| 154 | + inputs: |
| 155 | + pwsh: true |
| 156 | + filePath: eng/common/scripts/Update-DocsMsPackages.ps1 |
| 157 | + # Use the dotnet public daily package preview feed as the source for |
| 158 | + # updated packages. |
| 159 | + arguments: > |
| 160 | + -DocRepoLocation $(DocRepoLocation) |
| 161 | + -PackageSourceOverride $(PackageSourceOverride) |
| 162 | + displayName: Update Docs Onboarding for Daily docs |
| 163 | + |
| 164 | + - task: Powershell@2 |
| 165 | + inputs: |
| 166 | + pwsh: true |
| 167 | + filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1 |
| 168 | + arguments: >- |
| 169 | + -DocRepoLocation $(DocRepoLocation) |
| 170 | + -ReadmeFolderRoot 'api/overview/azure' |
| 171 | + displayName: Generate Service Level Readme for Daily docs |
| 172 | + |
| 173 | + - task: Powershell@2 |
| 174 | + inputs: |
| 175 | + pwsh: true |
| 176 | + filePath: eng/common/scripts/Update-DocsMsToc.ps1 |
| 177 | + arguments: >- |
| 178 | + -DocRepoLocation $(DocRepoLocation) |
| 179 | + -OutputLocation $(DocRepoLocation)/docs-ref-toc/reference-unified.yml |
| 180 | + -ReadmeFolderRoot "api/overview/azure" |
| 181 | + -PackageSourceOverride $(PackageSourceOverride) |
| 182 | + displayName: Generate ToC for Daily docs |
| 183 | + |
| 184 | + - template: /eng/common/pipelines/templates/steps/git-push-changes.yml |
| 185 | + parameters: |
| 186 | + BaseRepoBranch: $(DailyDocsBranchName) |
| 187 | + BaseRepoOwner: $(DocRepoOwner) |
| 188 | + CommitMsg: "Update targeting packages based on release metadata. (Daily docs)" |
| 189 | + TargetRepoName: $(DocRepoName) |
| 190 | + TargetRepoOwner: $(DocRepoOwner) |
| 191 | + WorkingDirectory: $(DocRepoLocation) |
| 192 | + ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts |
| 193 | + PushArgs: -f |
| 194 | + |
| 195 | + - task: AzureCLI@2 |
| 196 | + displayName: Queue Docs CI build |
| 197 | + inputs: |
| 198 | + azureSubscription: msdocs-apidrop-connection |
| 199 | + scriptType: pscore |
| 200 | + scriptLocation: inlineScript |
| 201 | + inlineScript: | |
| 202 | + $accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv |
| 203 | + $buildParamJson = (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json) |
| 204 | + eng/common/scripts/Queue-Pipeline.ps1 ` |
| 205 | + -Organization "apidrop" ` |
| 206 | + -Project "Content%20CI" ` |
| 207 | + -DefinitionId 397 ` |
| 208 | + -BuildParametersJson $buildParamJson ` |
| 209 | + -BearerToken $accessToken |
0 commit comments