Merge pull request #338 from chcosta/asset-file-path

Fix core-sdk manifest publishing
This commit is contained in:
Christopher Costa 2019-01-24 17:40:04 -08:00 committed by GitHub
commit 9fb6598a70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 10 deletions

View file

@ -45,21 +45,18 @@ jobs:
_BuildArchitecture: x86
_DOTNET_CLI_UI_LANGUAGE: ''
_DropSuffix: ''
_PublishBuildAssetManifest: true
# Always run builds
Build_Release_x64:
_BuildConfig: Release
_BuildArchitecture: x64
_DOTNET_CLI_UI_LANGUAGE: ''
_DropSuffix: ''
_PublishBuildAssetManifest: true
Build_Release_arm:
_BuildConfig: Release
_BuildArchitecture: arm
_DOTNET_CLI_UI_LANGUAGE: ''
_DropSuffix: ''
_AdditionalBuildParameters: '/p:DisableSourceLink=true'
_PublishBuildAssetManifest: true
- template: /eng/build.yml
parameters:
@ -176,7 +173,6 @@ jobs:
_RuntimeIdentifier: ''
_BuildArchitecture: 'arm'
_DropSuffix: ''
_PublishBuildAssetManifest: true
Build_Arm64_Release:
_BuildConfig: Release
_DockerParameter: ''
@ -184,7 +180,6 @@ jobs:
_RuntimeIdentifier: ''
_BuildArchitecture: 'arm64'
_DropSuffix: ''
_PublishBuildAssetManifest: true
Build_Rhel_6_Release_x64:
_BuildConfig: Release
_DockerParameter: '--docker rhel.6'
@ -227,7 +222,6 @@ jobs:
_RuntimeIdentifier: ''
_BuildArchitecture: 'x64'
_DropSuffix: ''
_PublishBuildAssetManifest: true
- template: /eng/build.yml
parameters:
@ -239,7 +233,6 @@ jobs:
matrix:
Build_Release:
_BuildConfig: Release
_PublishBuildAssetManifest: true
# https://github.com/dotnet/core-sdk/issues/248
# - template: /eng/build.yml

View file

@ -21,6 +21,19 @@
</PropertyGroup>
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' " />
<PropertyGroup>
<!-- Because we may be building in a container, we should use an asset manifest file path
that exists in the container. Disambiguate the manifests via RID and architecture -->
<AssetManifestFileName Condition="'$(AGENT_OS)' != ''">$(AGENT_OS)-$(PlatformName)</AssetManifestFileName>
<AssetManifestFileName Condition="'$(AGENT_OS)' == ''">$(OS)-$(PlatformName)</AssetManifestFileName>
<AssetManifestFileName Condition="'$(Rid)' != ''">$(AssetManifestFileName)-$(Rid)</AssetManifestFileName>
<AssetManifestFileName Condition="'$(Architecture)' != ''">$(AssetManifestFileName)-$(Architecture)</AssetManifestFileName>
<ChecksumsAssetManifestFileName>$(AssetManifestFileName)-checksums</ChecksumsAssetManifestFileName>
<!-- Property AssetManifestFilePath will be reassigned by the Arcade SDK, so use a different name (DotNetAssetManifestFilePath) -->
<DotNetAssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(AssetManifestFileName).xml</DotNetAssetManifestFilePath>
<ChecksumsAssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(ChecksumsAssetManifestFileName).xml</ChecksumsAssetManifestFilePath>
</PropertyGroup>
<ItemGroup>
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
@ -64,7 +77,7 @@
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
AssetManifestPath="$(AssetManifestFilePath)"
AssetManifestPath="$(DotNetAssetManifestFilePath)"
PublishFlatContainer="true" />
<PushToBlobFeed
@ -76,7 +89,7 @@
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
AssetManifestPath="$(AssetManifestFilePath)"
AssetManifestPath="$(ChecksumsAssetManifestFilePath)"
PublishFlatContainer="true"/>
</Target>
</Project>

View file

@ -46,7 +46,6 @@ phases:
/p:PB_PublishType=blob
/p:DotnetPublishChecksumsBlobFeedUrl=$(_PublishChecksumsBlobFeedUrl)
/p:DotNetPublishChecksumsBlobFeedKey=$(dotnetclichecksums-storage-key)
/p:AssetManifestFilePath=$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest/$(Agent.OS)_$(_BuildArchitecture).xml
/p:DotNetSignType=real
/p:TeamName=$(_TeamName)

View file

@ -140,6 +140,13 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \
-e PB_ASSETROOTURL \
-e PB_PACKAGEVERSIONPROPSURL \
-e PB_PUBLISHBLOBFEEDURL \
-e _PUBLISHBLOBFEEDURL \
-e _ASSETROOTURL \
-e _PACKAGEVERSIONPROPSURL \
-e EXTERNALRESTORESOURCES \
-e BUILD_REPOSITORY_URI \
-e BUILD_SOURCEBRANCH \
-e BUILD_BUILDNUMBER \
-e BUILD_SOURCEVERSION \
$DOTNET_BUILD_CONTAINER_TAG \
$BUILD_COMMAND "$@"