Write-Host" -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host" -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host" -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host" -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host" -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
echo"BuildArch can be: arm(default), armel, arm64, x86"
echo"CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
echo" for FreeBSD can be: freebsd11, freebsd12, freebsd13"
echo"CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
echo" for FreeBSD can be: freebsd12, freebsd13"
echo" for illumos can be: illumos"
echo" for Haiku can be: haiku."
echo"lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
echo"llvmx[.y] - optional, LLVM version for LLVM related packages."
echo"--skipunmount - optional, will skip the unmount of rootfs folder."
echo"--use-mirror - optional, use mirror URL to fetch resources, when available."
$jsonWinformsTemplateFiles=Get-ChildItem-Recurse-Path"$SourcesDirectory"|Where-Object{$_.FullName-Match"en\\strings\.json"}# current winforms pattern
$wxlFiles=Get-ChildItem-Recurse-Path"$SourcesDirectory"|Where-Object{$_.FullName-Match"\\.+\.wxl"-And-Not($_.Directory.Name-Match"\d{4}")}# localized files live in four digit lang ID directories; this excludes them
# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts.
Write-Error"Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool."
exit1
}
$BinPath=Get-Content"$BinPathFile"
$ToolPath=Convert-Path-Path$BinPath
Write-Host"Adding $ToolName to the path ($ToolPath)..."
Write-PipelineTelemetryError-Category'NativeToolsBootstrap'-Message"$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding."
Write-PipelineTelemetryError -category "Build" -type "warning""Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
CC="$(command -v "$compiler")"
CXX="$(command -v "$cxxCompiler")"
else
Write-PipelineTelemetryError -category "Build""Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
[string]$GuardianLoggerLevel='Standard',# Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
[string[]]$CrScanAdditionalRunConfigParams,# Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
[string[]]$PoliCheckAdditionalRunConfigParams,# Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
[string[]]$CodeQLAdditionalRunConfigParams,# Optional: Additional Params to custom build a Semmle/CodeQL run config in the format @("xyz < abc","sdf < 1")
[bool]$BreakOnFailure=$False# Optional: Fail the build if there were errors during the run
# Optional: Override automatically derived dependsOn value for "publish build assets" job
publishBuildAssetsDependsOn:''
# Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage.
publishAssetsImmediately:false
# Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml)
artifactsPublishingAdditionalParameters:''
signingValidationAdditionalParameters:''
# Optional: should run as a public build even in the internal project
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
runAsPublic:false
@ -68,7 +75,6 @@ jobs:
${{ parameter.key }}: ${{ parameter.value }}
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
- template:../job/publish-build-assets.yml
parameters:
@ -83,17 +89,18 @@ jobs:
- ${{ if eq(parameters.enableSourceBuild, true) }}:
- Source_Build_Complete
pool:
vmImage:vs2017-win2016
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
name:VSEngSS-MicroBuild2022-1ES
demands:Cmd
# If it's not devdiv, it's dnceng
${{ if ne(variables['System.TeamProject'], 'DevDiv') }}:
HelixSource:'pr/default'# required -- sources must start with pr/, official/, prodcon/, or agent/
HelixType:'tests/default/'# required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/'
HelixBuild:$(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
HelixTargetQueues:''# required -- semicolondelimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues
HelixTargetQueues:''# required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues
HelixAccessToken:''# required -- access token to make Helix API requests; should be provided by the appropriate variable group
HelixConfiguration:''# optional -- additional property attached to a job
HelixPreCommands:''# optional -- commands to run before Helix work item execution
@ -12,7 +12,7 @@ parameters:
WorkItemCommand:''# optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects
WorkItemTimeout:''# optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects
CorrelationPayloadDirectory:''# optional -- a directory to zip up and send to Helix as a correlation payload
XUnitProjects:''# optional -- semicolondelimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true
XUnitProjects:''# optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true
XUnitWorkItemTimeout:''# optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects
XUnitPublishTargetFramework:''# optional -- framework to use to publish your xUnit projects
XUnitRuntimeTargetFramework:''# optional -- framework to use for the xUnit console runner
@ -20,17 +20,16 @@ parameters:
IncludeDotNetCli:false# optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
DotNetCliPackageType:''# optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json
DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this:https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json
EnableXUnitReporter:false# optional -- true enables XUnit result reporting to Mission Control
WaitForWorkItemCompletion:true# optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
IsExternal:false# [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
HelixBaseUri:'https://helix.dot.net/'# optional -- sets the Helix API base URI (allows targeting int)
HelixBaseUri:'https://helix.dot.net/'# optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net )
Creator:''# optional -- if the build is external, use this to specify who is sending the job
DisplayNamePrefix:'Run Tests'# optional -- rename the beginning of the displayName of the steps in AzDO
condition:succeeded() # optional -- condition for step to execute; defaults to succeeded()
continueOnError:false# optional -- determines whether to continue the build if the step errors; defaults to false