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
|
# 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_SOURCEVERSION=$BUILD_SOURCEVERSION"
|
||||||
|
|
||||||
|
customEnvVars="$customEnvVars BUILD_BUILDNUMBER=$(Build.BuildNumber)"
|
||||||
|
|
||||||
customDockerRunArgs=""
|
customDockerRunArgs=""
|
||||||
for envVar in $customEnvVars; do
|
for envVar in $customEnvVars; do
|
||||||
customDockerRunArgs="$customDockerRunArgs -e $envVar"
|
customDockerRunArgs="$customDockerRunArgs -e $envVar"
|
||||||
|
|
|
@ -214,12 +214,6 @@
|
||||||
<PoisonedReportFile>$(PackageReportDir)poisoned.txt</PoisonedReportFile>
|
<PoisonedReportFile>$(PackageReportDir)poisoned.txt</PoisonedReportFile>
|
||||||
</PropertyGroup>
|
</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)" />
|
<Import Project="$(GitInfoAllRepoPropsFile)" />
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -36,10 +36,11 @@
|
||||||
<RepoAssetManifest Include="$(AssetManifestsIntermediateDir)\**\*.xml" />
|
<RepoAssetManifest Include="$(AssetManifestsIntermediateDir)\**\*.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- It's OK for the VmrBuildNumber to be empty -->
|
||||||
<Microsoft.DotNet.UnifiedBuild.Tasks.MergeAssetManifests
|
<Microsoft.DotNet.UnifiedBuild.Tasks.MergeAssetManifests
|
||||||
AssetManifest="@(RepoAssetManifest)"
|
AssetManifest="@(RepoAssetManifest)"
|
||||||
MergedAssetManifestOutputPath="$(MergedAssetManifestOutputPath)"
|
MergedAssetManifestOutputPath="$(MergedAssetManifestOutputPath)"
|
||||||
VmrBuildNumber="$(VmrBuildNumber)" />
|
VmrBuildNumber="$(BUILD_BUILDNUMBER)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Import Project="$(RepositoryEngineeringDir)build.sourcebuild.targets" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
|
<Import Project="$(RepositoryEngineeringDir)build.sourcebuild.targets" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
|
||||||
|
|
|
@ -31,8 +31,7 @@ namespace Microsoft.DotNet.UnifiedBuild.Tasks
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Azure DevOps build number
|
/// Azure DevOps build number
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
public string VmrBuildNumber { get; set; } = string.Empty;
|
||||||
public required string VmrBuildNumber { get; init; }
|
|
||||||
|
|
||||||
private static readonly string _buildIdAttribute = "BuildId";
|
private static readonly string _buildIdAttribute = "BuildId";
|
||||||
private static readonly string _azureDevOpsBuildNumberAttribute = "AzureDevOpsBuildNumber";
|
private static readonly string _azureDevOpsBuildNumberAttribute = "AzureDevOpsBuildNumber";
|
||||||
|
|
Loading…
Reference in a new issue