From bfb93224150d7634403cd0deefc1c08f632f1e32 Mon Sep 17 00:00:00 2001 From: jbeisner Date: Fri, 12 Jan 2018 22:11:15 +0000 Subject: [PATCH 1/6] Enabling the publish of assets to 'orchestrated' blob storage. --- build/AzureInfo.props | 37 ++++++++++++-------- build/Publish.targets | 7 ++-- build/publish/AzureInfo.targets | 21 +++++++++++ build/publish/FinishBuild.targets | 1 + build/publish/PublishNupkgToBlobFeed.targets | 2 +- 5 files changed, 51 insertions(+), 17 deletions(-) create mode 100644 build/publish/AzureInfo.targets diff --git a/build/AzureInfo.props b/build/AzureInfo.props index 5ec5c5b86..af0dbe265 100644 --- a/build/AzureInfo.props +++ b/build/AzureInfo.props @@ -1,27 +1,36 @@ - Sdk + True + Sdk + + https://dotnetcli.azureedge.net/dotnet/ - $(PB_AssetRootUrl) + $(PB_AssetRootUrl) $(DefaultCoreSetupBlobRootUrl) $(DefaultCoreSetupBlobRootUrl) $(PB_AssetRootAccessTokenSuffix) ?$(CoreSetupBlobAccessToken) - $(ARTIFACT_STORAGE_CONTAINER) - dotnet - $(ARTIFACT_STORAGE_KEY) + + $(ARTIFACT_STORAGE_ACCOUNT) dotnetcli - https://$(ArtifactCloudDropAccountName).blob.core.windows.net/$(ArtifactContainerName) - $(CHECKSUM_STORAGE_CONTAINER) - dotnet - $(CHECKSUM_STORAGE_KEY) + $(ARTIFACT_STORAGE_CONTAINER) + dotnet + PB_PublishBlobFeedKey) + $(ARTIFACT_STORAGE_KEY) + + $(CHECKSUM_STORAGE_ACCOUNT) dotnetclichecksums - $(BLOBFEED_STORAGE_CONTAINER) - dotnet-core - $(BLOBFEED_EXPECTED_URL) - https://dotnetfeed.blob.core.windows.net/$(BlobFeedContainerName)/index.json - $(BLOBFEED_STORAGE_KEY) + $(CHECKSUM_STORAGE_CONTAINER) + dotnet + PB_PublishBlobFeedKey) + $(CHECKSUM_STORAGE_KEY) + + + $(PB_PublishBlobFeedUrl) + https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + PB_PublishBlobFeedKey) + $(BLOBFEED_STORAGE_KEY) diff --git a/build/Publish.targets b/build/Publish.targets index 1ab0e0b9e..1c638da1a 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -4,6 +4,7 @@ + @@ -12,6 +13,7 @@ Condition=" '$(PUBLISH_TO_AZURE_BLOB)' == 'true' " DependsOnTargets="Init; SetBadgeProps; + SetAzureProps; Package; EvaluateRuntimeCoherence; PublishArtifacts; @@ -21,6 +23,7 @@ Condition=" '$(PUBLISH_TO_AZURE_BLOB)' == 'true' " DependsOnTargets="Init; SetBadgeProps; + SetAzureProps; EvaluateRuntimeCoherence; PublishArtifacts; FinishBuild" /> @@ -52,7 +55,7 @@ - $(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/')) + $(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/')) @@ -66,7 +69,7 @@ - $(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/')) + $(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/')) diff --git a/build/publish/AzureInfo.targets b/build/publish/AzureInfo.targets new file mode 100644 index 000000000..2d3229b36 --- /dev/null +++ b/build/publish/AzureInfo.targets @@ -0,0 +1,21 @@ + + + + + + + + + + + + %(BlobElements.ContainerName) + %(BlobElements.ContainerName) + %(BlobElements.AccountName) + %(BlobElements.AccountName) + %(BlobElements.BlobPath)/assets + + + + diff --git a/build/publish/FinishBuild.targets b/build/publish/FinishBuild.targets index dfb224431..58e9cbe2f 100644 --- a/build/publish/FinishBuild.targets +++ b/build/publish/FinishBuild.targets @@ -1,6 +1,7 @@ diff --git a/build/publish/PublishNupkgToBlobFeed.targets b/build/publish/PublishNupkgToBlobFeed.targets index eb8ba821a..6a5eaa6eb 100644 --- a/build/publish/PublishNupkgToBlobFeed.targets +++ b/build/publish/PublishNupkgToBlobFeed.targets @@ -7,7 +7,7 @@ - + From 5e6c339e1601bbebccd1fbaa85c256f3d125cc76 Mon Sep 17 00:00:00 2001 From: jbeisner Date: Fri, 12 Jan 2018 22:27:46 +0000 Subject: [PATCH 2/6] Simplification: remove Boolean 'PUBLISH_NUPKG_TO_AZURE_BLOB' --- build/Publish.targets | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/Publish.targets b/build/Publish.targets index 1c638da1a..f473cd251 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -46,11 +46,11 @@ + Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/> + Condition=" '$(OS)' == 'Windows_NT' "/> + Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/> From cbcd4fd3c379db476de0ee4baa27edead98f47b0 Mon Sep 17 00:00:00 2001 From: jbeisner Date: Fri, 12 Jan 2018 22:46:25 +0000 Subject: [PATCH 3/6] Fixing a typo... --- build/AzureInfo.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/AzureInfo.props b/build/AzureInfo.props index af0dbe265..90169ffa0 100644 --- a/build/AzureInfo.props +++ b/build/AzureInfo.props @@ -16,7 +16,7 @@ dotnetcli $(ARTIFACT_STORAGE_CONTAINER) dotnet - PB_PublishBlobFeedKey) + $(PB_PublishBlobFeedKey) $(ARTIFACT_STORAGE_KEY) @@ -24,13 +24,13 @@ dotnetclichecksums $(CHECKSUM_STORAGE_CONTAINER) dotnet - PB_PublishBlobFeedKey) + $(PB_PublishBlobFeedKey) $(CHECKSUM_STORAGE_KEY) $(PB_PublishBlobFeedUrl) https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - PB_PublishBlobFeedKey) + $(PB_PublishBlobFeedKey) $(BLOBFEED_STORAGE_KEY) From aa458eca823fe3112a50b45acf2df81f529d9c12 Mon Sep 17 00:00:00 2001 From: jbeisner Date: Fri, 12 Jan 2018 23:34:38 +0000 Subject: [PATCH 4/6] Strip off "index.json" before appending "assets" --- build/publish/AzureInfo.targets | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build/publish/AzureInfo.targets b/build/publish/AzureInfo.targets index 2d3229b36..50a52e317 100644 --- a/build/publish/AzureInfo.targets +++ b/build/publish/AzureInfo.targets @@ -1,7 +1,6 @@ - - + @@ -9,12 +8,20 @@ + + %(BlobElements.BlobPath) + + + + + + %(BlobElements.ContainerName) %(BlobElements.ContainerName) %(BlobElements.AccountName) %(BlobElements.AccountName) - %(BlobElements.BlobPath)/assets + %(BlobPath)assets From 6d9130dc61e00a4f6b4eadb2e7ecb3b54dd001bd Mon Sep 17 00:00:00 2001 From: jbeisner Date: Sat, 13 Jan 2018 00:07:01 +0000 Subject: [PATCH 5/6] Simplify the 'index.json' removal. --- build/publish/AzureInfo.targets | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/build/publish/AzureInfo.targets b/build/publish/AzureInfo.targets index 50a52e317..3e4600ee5 100644 --- a/build/publish/AzureInfo.targets +++ b/build/publish/AzureInfo.targets @@ -8,20 +8,13 @@ - - %(BlobElements.BlobPath) - - - - - - %(BlobElements.ContainerName) %(BlobElements.ContainerName) %(BlobElements.AccountName) %(BlobElements.AccountName) - %(BlobPath)assets + %(BlobElements.BlobPath) + $(PublishBlobFeedUrlBlobPath.Replace('/index.json', ''))/assets From 429f2fde07f49b56c19ecea8c7bbc71e2dd5cd43 Mon Sep 17 00:00:00 2001 From: jbeisner Date: Sat, 13 Jan 2018 02:46:14 +0000 Subject: [PATCH 6/6] Found a version of 'microsoft.dotnet.build.tasks.feed' that supports both parsing of the URL and the currrent Nupkg upload method: 2.1.0-prerelease-02312-02 --- build/DependencyVersions.props | 2 +- build/publish/AzureInfo.targets | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index a9429c8de..0edcf403a 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -68,7 +68,7 @@ 1.0.27-prerelease-01723-01 2.0.0-preview2-25331-01 - 2.1.0-prerelease-02221-02 + 2.1.0-prerelease-02312-02 diff --git a/build/publish/AzureInfo.targets b/build/publish/AzureInfo.targets index 3e4600ee5..351357cc5 100644 --- a/build/publish/AzureInfo.targets +++ b/build/publish/AzureInfo.targets @@ -1,21 +1,21 @@ - + - + - + %(BlobElements.ContainerName) %(BlobElements.ContainerName) %(BlobElements.AccountName) %(BlobElements.AccountName) - %(BlobElements.BlobPath) + %(BlobElements.BaseBlobPath) $(PublishBlobFeedUrlBlobPath.Replace('/index.json', ''))/assets - +