Fix vmr build number (#19217)
This commit is contained in:
parent
ba50c92ce5
commit
6b0cb559d9
4 changed files with 5 additions and 9 deletions
|
@ -321,6 +321,8 @@ jobs:
|
|||
# Allows Arcade to have access to the commit for the build, pass it through to the container
|
||||
customEnvVars="$customEnvVars BUILD_SOURCEVERSION=$BUILD_SOURCEVERSION"
|
||||
|
||||
customEnvVars="$customEnvVars BUILD_BUILDNUMBER=$(Build.BuildNumber)"
|
||||
|
||||
customDockerRunArgs=""
|
||||
for envVar in $customEnvVars; do
|
||||
customDockerRunArgs="$customDockerRunArgs -e $envVar"
|
||||
|
|
|
@ -214,12 +214,6 @@
|
|||
<PoisonedReportFile>$(PackageReportDir)poisoned.txt</PoisonedReportFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- The predefined environmental variable `BUILD_BUILDNUMBER` is getting overwritten in repo-projects,
|
||||
so save it in a different varialbe-->
|
||||
<PropertyGroup>
|
||||
<VmrBuildNumber>$(BUILD_BUILDNUMBER)"</VmrBuildNumber>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(GitInfoAllRepoPropsFile)" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -36,10 +36,11 @@
|
|||
<RepoAssetManifest Include="$(AssetManifestsIntermediateDir)\**\*.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- It's OK for the VmrBuildNumber to be empty -->
|
||||
<Microsoft.DotNet.UnifiedBuild.Tasks.MergeAssetManifests
|
||||
AssetManifest="@(RepoAssetManifest)"
|
||||
MergedAssetManifestOutputPath="$(MergedAssetManifestOutputPath)"
|
||||
VmrBuildNumber="$(VmrBuildNumber)" />
|
||||
VmrBuildNumber="$(BUILD_BUILDNUMBER)" />
|
||||
</Target>
|
||||
|
||||
<Import Project="$(RepositoryEngineeringDir)build.sourcebuild.targets" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
|
||||
|
|
|
@ -31,8 +31,7 @@ namespace Microsoft.DotNet.UnifiedBuild.Tasks
|
|||
/// <summary>
|
||||
/// Azure DevOps build number
|
||||
/// </summary>
|
||||
[Required]
|
||||
public required string VmrBuildNumber { get; init; }
|
||||
public string VmrBuildNumber { get; set; } = string.Empty;
|
||||
|
||||
private static readonly string _buildIdAttribute = "BuildId";
|
||||
private static readonly string _azureDevOpsBuildNumberAttribute = "AzureDevOpsBuildNumber";
|
||||
|
|
Loading…
Reference in a new issue