1{
2  "build": [
3    {
4      "enabled": true,
5      "continueOnError": false,
6      "alwaysRun": false,
7      "displayName": "Run script $(VS140COMNTOOLS)\\VsDevCmd.bat",
8      "timeoutInMinutes": 0,
9      "task": {
10        "id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
11        "versionSpec": "*",
12        "definitionType": "task"
13      },
14      "inputs": {
15        "filename": "$(VS140COMNTOOLS)\\VsDevCmd.bat",
16        "arguments": "",
17        "modifyEnvironment": "true",
18        "workingFolder": "",
19        "failOnStandardError": "false"
20      }
21    },
22    {
23      "enabled": true,
24      "continueOnError": false,
25      "alwaysRun": false,
26      "displayName": "Fetch custom tooling (NuGet, EmbedIndex)",
27      "timeoutInMinutes": 0,
28      "task": {
29        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
30        "versionSpec": "*",
31        "definitionType": "task"
32      },
33      "inputs": {
34        "scriptType": "filePath",
35        "scriptName": "scripts/DotNet-Trusted-Publish/Fetch-Tools.ps1",
36        "arguments": "$(Build.StagingDirectory)\\ToolingDownload",
37        "inlineScript": "# You can write your powershell scripts inline here. \n# You can also pass predefined and custom variables to this scripts using arguments\n\n Write-Host \"Hello World\"",
38        "workingFolder": "",
39        "failOnStandardError": "true"
40      }
41    },
42    {
43      "enabled": true,
44      "continueOnError": false,
45      "alwaysRun": false,
46      "displayName": "Set up pipeline-specific git repository",
47      "timeoutInMinutes": 0,
48      "task": {
49        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
50        "versionSpec": "*",
51        "definitionType": "task"
52      },
53      "inputs": {
54        "scriptType": "inlineScript",
55        "scriptName": "",
56        "arguments": "-gitUrl $(GitUrl) -root $(Pipeline.SourcesDirectory)",
57        "inlineScript": "param($gitUrl, $root)\n\nif (Test-Path $root)\n{\n  Remove-Item -Recurse -Force $root\n}\ngit clone --no-checkout $gitUrl $root 2>&1 | Write-Host\ncd $root\ngit checkout $env:SourceVersion 2>&1 | Write-Host\n\nWrite-Host (\"##vso[task.setvariable variable=Pipeline.SourcesDirectory;]$root\")",
58        "workingFolder": "",
59        "failOnStandardError": "true"
60      }
61    },
62    {
63      "enabled": true,
64      "continueOnError": false,
65      "alwaysRun": false,
66      "displayName": "Download packages",
67      "timeoutInMinutes": 0,
68      "task": {
69        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
70        "versionSpec": "*",
71        "definitionType": "task"
72      },
73      "inputs": {
74        "scriptType": "inlineScript",
75        "scriptName": "",
76        "arguments": "$(CloudDropAccountName) $(CloudDropAccessToken) $(Label)",
77        "inlineScript": "param($account, $token, $container)\nif ($env:UseLegacyBuildScripts -eq \"true\")\n{\n  .\\sync.cmd /ab /p:CloudDropAccountName=$account /p:CloudDropAccessToken=$token /p:ContainerName=$container\n}\nelse\n{\n  .\\init-tools.cmd\n  msbuild buildscripts\\syncAzure.proj /p:CloudDropAccountName=$account /p:CloudDropAccessToken=$token /p:ContainerName=$container /fl \"/flp:v=diag;logfile=package-download.log\"\n}",
78        "workingFolder": "$(Pipeline.SourcesDirectory)",
79        "failOnStandardError": "false"
80      }
81    },
82    {
83      "enabled": true,
84      "continueOnError": false,
85      "alwaysRun": false,
86      "displayName": "Index symbol packages",
87      "timeoutInMinutes": 0,
88      "task": {
89        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
90        "versionSpec": "*",
91        "definitionType": "task"
92      },
93      "inputs": {
94        "scriptType": "inlineScript",
95        "scriptName": "",
96        "arguments": "",
97        "inlineScript": "if ($env:Configuration -ne \"Release\") { exit }\n\n& $env:Build_SourcesDirectory\\scripts\\DotNet-Trusted-Publish\\Embed-Index.ps1 `\n  $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\$env:Configuration\\$env:AzureContainerSymbolPackageGlob `\n  $env:Build_StagingDirectory\\IndexedSymbolPackages",
98        "workingFolder": "",
99        "failOnStandardError": "true"
100      }
101    },
102    {
103      "enabled": true,
104      "continueOnError": false,
105      "alwaysRun": false,
106      "displayName": "Generate Version Assets",
107      "timeoutInMinutes": 0,
108      "task": {
109        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
110        "versionSpec": "*",
111        "definitionType": "task"
112      },
113      "inputs": {
114        "scriptType": "inlineScript",
115        "scriptName": "",
116        "arguments": "",
117        "inlineScript": "msbuild build.proj /t:CreateOrUpdateCurrentVersionFile /p:OfficialBuildId=$env:OfficialBuildId /p:BuildVersionFile=bin\\obj\\BuildVersion-$env:OfficialBuildId.props",
118        "workingFolder": "$(Pipeline.SourcesDirectory)",
119        "failOnStandardError": "true"
120      }
121    },
122    {
123      "enabled": true,
124      "continueOnError": true,
125      "alwaysRun": false,
126      "displayName": "Log Native Version Assets Files",
127      "timeoutInMinutes": 0,
128      "task": {
129        "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
130        "versionSpec": "*",
131        "definitionType": "task"
132      },
133      "inputs": {
134        "filename": "dir",
135        "arguments": "$(Pipeline.SourcesDirectory)\\bin\\obj\\BuildVersion*",
136        "workingFolder": "",
137        "failOnStandardError": "false"
138      }
139    },
140    {
141      "enabled": true,
142      "continueOnError": false,
143      "alwaysRun": false,
144      "displayName": "packages -> dotnet.myget.org",
145      "timeoutInMinutes": 0,
146      "task": {
147        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
148        "versionSpec": "*",
149        "definitionType": "task"
150      },
151      "inputs": {
152        "scriptType": "inlineScript",
153        "scriptName": "",
154        "arguments": "$(MyGetApiKey)",
155        "inlineScript": "param($ApiKey)\nif ($env:Configuration -ne \"Release\") { exit }\n& $env:CustomNuGetPath push $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\$env:Configuration\\$env:AzureContainerPackageGlob $ApiKey -Source $env:MyGetFeedUrl -Timeout 3600",
156        "workingFolder": "",
157        "failOnStandardError": "true"
158      }
159    },
160    {
161      "enabled": true,
162      "continueOnError": false,
163      "alwaysRun": false,
164      "displayName": "symbol packages -> dotnet.myget.org",
165      "timeoutInMinutes": 0,
166      "task": {
167        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
168        "versionSpec": "*",
169        "definitionType": "task"
170      },
171      "inputs": {
172        "scriptType": "inlineScript",
173        "scriptName": "",
174        "arguments": "$(MyGetApiKey)",
175        "inlineScript": "param($ApiKey)\nif ($env:Configuration -ne \"Release\") { exit }\n& $env:CustomNuGetPath push $env:Build_StagingDirectory\\IndexedSymbolPackages\\*.nupkg $ApiKey -Source $env:MyGetFeedUrl -Timeout 3600",
176        "workingFolder": "",
177        "failOnStandardError": "true"
178      }
179    },
180    {
181      "enabled": true,
182      "continueOnError": false,
183      "alwaysRun": false,
184      "displayName": "Update versions repository",
185      "timeoutInMinutes": 0,
186      "task": {
187        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
188        "versionSpec": "*",
189        "definitionType": "task"
190      },
191      "inputs": {
192        "scriptType": "inlineScript",
193        "scriptName": "",
194        "arguments": "-gitHubAuthToken $(UpdatePublishedVersions.AuthToken) -root $(Pipeline.SourcesDirectory)",
195        "inlineScript": "param($gitHubAuthToken, $root)\nif ($env:Configuration -ne \"Release\") { exit }\ncd $root\n. $root\\buildscripts\\UpdatePublishedVersions.ps1 `\n  -gitHubUser dotnet-build-bot -gitHubEmail dotnet-build-bot@microsoft.com `\n  -gitHubAuthToken $gitHubAuthToken `\n  -versionsRepoOwner $env:VersionsRepoOwner -versionsRepo $env:VersionsRepo `\n  -versionsRepoPath build-info/dotnet/$env:GitHubRepositoryName/$env:SourceBranch `\n  -nupkgPath $root\\packages\\AzureTransfer\\$env:Configuration\\$env:AzureContainerPackageGlob",
196        "workingFolder": "",
197        "failOnStandardError": "true"
198      }
199    },
200    {
201      "enabled": true,
202      "continueOnError": false,
203      "alwaysRun": false,
204      "displayName": "Get Build Number",
205      "timeoutInMinutes": 0,
206      "task": {
207        "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
208        "versionSpec": "*",
209        "definitionType": "task"
210      },
211      "inputs": {
212        "scriptType": "inlineScript",
213        "scriptName": "",
214        "arguments": "$(OfficialBuildId) $(Pipeline.SourcesDirectory)",
215        "inlineScript": "param(\n  [string]$OfficialBuildId,\n  [string]$SourcesDir\n)\n$VersionPropsFile=$SourcesDir + \"\\bin\\obj\\BuildVersion-\" + $OfficialBuildId + \".props\"\n[xml]$versionXml=Get-Content $VersionPropsFile\n$env:BuildNumber=$versionXml.Project.PropertyGroup.BuildNumberMajor.InnerText + \".\" + $versionXml.Project.PropertyGroup.BuildNumberMinor.InnerText\nWrite-Host (\"##vso[task.setvariable variable=BuildNumber;]$env:BuildNumber\")",
216        "workingFolder": "",
217        "failOnStandardError": "true"
218      }
219    },
220    {
221      "enabled": true,
222      "continueOnError": true,
223      "alwaysRun": false,
224      "displayName": "Publish to Artifact Services Drop (BuildNumber)",
225      "timeoutInMinutes": 0,
226      "task": {
227        "id": "f9d96d25-0c81-4e77-8282-1ad1f785cbb4",
228        "versionSpec": "*",
229        "definitionType": "task"
230      },
231      "inputs": {
232        "dropServiceURI": "https://devdiv.artifacts.visualstudio.com/DefaultCollection",
233        "buildNumber": "dotnet/$(GitHubRepositoryName)/$(SourceBranch)/$(BuildNumber)/packages/$(Configuration)",
234        "sourcePath": "$(Pipeline.SourcesDirectory)\\packages\\AzureTransfer",
235        "dropExePath": "",
236        "toLowerCase": "true",
237        "detailedLog": "false",
238        "usePat": "false"
239      }
240    },
241    {
242      "enabled": true,
243      "continueOnError": true,
244      "alwaysRun": false,
245      "displayName": "Publish to Artifact Services Drop (OfficialBuildId)",
246      "timeoutInMinutes": 0,
247      "task": {
248        "id": "f9d96d25-0c81-4e77-8282-1ad1f785cbb4",
249        "versionSpec": "*",
250        "definitionType": "task"
251      },
252      "inputs": {
253        "dropServiceURI": "https://devdiv.artifacts.visualstudio.com/DefaultCollection",
254        "buildNumber": "dotnet/$(GitHubRepositoryName)/$(SourceBranch)/$(OfficialBuildId)/packages/$(Configuration)",
255        "sourcePath": "$(Pipeline.SourcesDirectory)\\packages\\AzureTransfer",
256        "dropExePath": "",
257        "toLowerCase": "true",
258        "detailedLog": "false",
259        "usePat": "false"
260      }
261    },
262    {
263      "enabled": true,
264      "continueOnError": false,
265      "alwaysRun": true,
266      "displayName": "Copy Publish Artifact: PublishLogs",
267      "timeoutInMinutes": 0,
268      "task": {
269        "id": "1d341bb0-2106-458c-8422-d00bcea6512a",
270        "versionSpec": "*",
271        "definitionType": "task"
272      },
273      "inputs": {
274        "CopyRoot": "",
275        "Contents": "**\\*.log",
276        "ArtifactName": "PublishLogs",
277        "ArtifactType": "Container",
278        "TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
279      }
280    }
281  ],
282  "options": [
283    {
284      "enabled": false,
285      "definition": {
286        "id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
287      },
288      "inputs": {
289        "multipliers": "[]",
290        "parallel": "false",
291        "continueOnError": "true",
292        "additionalFields": "{}"
293      }
294    },
295    {
296      "enabled": false,
297      "definition": {
298        "id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
299      },
300      "inputs": {
301        "workItemType": "234347",
302        "assignToRequestor": "true",
303        "additionalFields": "{}"
304      }
305    },
306    {
307      "enabled": false,
308      "definition": {
309        "id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
310      },
311      "inputs": {
312        "additionalFields": "{}"
313      }
314    }
315  ],
316  "variables": {
317    "system.debug": {
318      "value": "false",
319      "allowOverride": true
320    },
321    "Configuration": {
322      "value": "Debug",
323      "allowOverride": true
324    },
325    "TeamName": {
326      "value": "DotNetCore"
327    },
328    "CloudDropAccountName": {
329      "value": "dotnetbuildoutput"
330    },
331    "CloudDropAccessToken": {
332      "value": null,
333      "isSecret": true
334    },
335    "OfficialBuildId": {
336      "value": "$(Build.BuildNumber)",
337      "allowOverride": true
338    },
339    "BuildTag": {
340      "value": "corert-alpha",
341      "allowOverride": true
342    },
343    "Label": {
344      "value": "$(BuildTag)-$(Build.BuildNumber)",
345      "allowOverride": true
346    },
347    "MyGetFeedUrl": {
348      "value": "https://dotnet.myget.org/F/dotnet-core/api/v2/package",
349      "allowOverride": true
350    },
351    "MyGetApiKey": {
352      "value": null,
353      "isSecret": true
354    },
355    "VstsPat": {
356      "value": null,
357      "isSecret": true
358    },
359    "DevDivPat": {
360      "value": null,
361      "isSecret": true
362    },
363    "UpdatePublishedVersions.AuthToken": {
364      "value": null,
365      "isSecret": true
366    },
367    "VersionsRepoOwner": {
368      "value": "crummel",
369      "allowOverride": true
370    },
371    "VersionsRepo": {
372      "value": "dotnet_versions",
373      "allowOverride": true
374    },
375    "Pipeline.SourcesDirectory": {
376      "value": "$(Build.BinariesDirectory)\\pipelineRepository"
377    },
378    "SourceVersion": {
379      "value": "master",
380      "allowOverride": true
381    },
382    "SourceBranch": {
383      "value": "master",
384      "allowOverride": true
385    },
386    "AzureContainerPackageGlob": {
387      "value": "*.nupkg",
388      "allowOverride": true
389    },
390    "AzureContainerSymbolPackageGlob": {
391      "value": "symbols\\*.nupkg",
392      "allowOverride": true
393    },
394    "GitHubRepositoryName": {
395      "value": "corert"
396    },
397    "UseLegacyBuildScripts": {
398      "value": "false",
399      "allowOverride": true
400    }
401  },
402  "retentionRules": [
403    {
404      "branches": [
405        "+refs/heads/*"
406      ],
407      "artifacts": [],
408      "artifactTypesToDelete": [
409        "FilePath",
410        "SymbolStore"
411      ],
412      "daysToKeep": 10,
413      "minimumToKeep": 1,
414      "deleteBuildRecord": true,
415      "deleteTestResults": true
416    }
417  ],
418  "buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)",
419  "jobAuthorizationScope": "projectCollection",
420  "jobTimeoutInMinutes": 180,
421  "repository": {
422    "properties": {
423      "labelSources": "0",
424      "reportBuildStatus": "false"
425    },
426    "id": "0a2b2664-c1be-429c-9b40-8a24dee27a4a",
427    "type": "TfsGit",
428    "name": "DotNet-BuildPipeline",
429    "url": "https://devdiv.visualstudio.com/DevDiv/_git/DotNet-BuildPipeline",
430    "defaultBranch": "refs/heads/master",
431    "clean": "true",
432    "checkoutSubmodules": false
433  },
434  "quality": "definition",
435  "defaultBranch": "refs/heads/master",
436  "queue": {
437    "pool": {
438      "id": 39,
439      "name": "DotNet-Build"
440    },
441    "id": 36,
442    "name": "DotNet-Build"
443  },
444  "path": "\\",
445  "type": "build",
446  "id": 2943,
447  "name": "DotNet-CoreRT-Publish",
448  "project": {
449    "id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
450    "name": "DevDiv",
451    "description": "Visual Studio and DevDiv team project for git source code repositories.  Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv.  ",
452    "url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
453    "state": "wellFormed",
454    "revision": 418097399
455  }
456}