From a97b701448b364b1ba9ca38a21de33983680d204 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Mon, 14 May 2018 15:26:17 -0500 Subject: [PATCH] Publishing nuget packages to myget feed. Also - set the symbols expiration days default based on feedback from the .NET core-eng team. Fixes #11 --- build/publish.proj | 41 ++++++++++++++++++++++++++++++++++++++--- build/vsts-ci.yml | 29 ++++++++++++++++++++--------- 2 files changed, 58 insertions(+), 12 deletions(-) diff --git a/build/publish.proj b/build/publish.proj index ac97f27810a..6a0dc1df398 100644 --- a/build/publish.proj +++ b/build/publish.proj @@ -1,14 +1,49 @@ - + + + + Microsoft.SymbolUploader.Build.Task true + 3600 - + + + + + + + + + + Pushing took too long + + + + + + $(DotnetToolCommand) nuget push --source $(NuGetFeedUrl) --api-key $(NuGetApiKey) --timeout $(NuGetPushTimeoutSeconds) + + + + + + @@ -18,7 +53,7 @@ - 1 + 180 true diff --git a/build/vsts-ci.yml b/build/vsts-ci.yml index 0cec208a43f..5998c341db0 100644 --- a/build/vsts-ci.yml +++ b/build/vsts-ci.yml @@ -6,6 +6,9 @@ phases: _PREVIEW_VSTS_DOCKER_IMAGE: microsoft/dotnet-buildtools-prereqs:centos-7-d485f41-20173404063424 BuildConfig: Release OfficialBuildId: $(BUILD.BUILDNUMBER) + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 queue: name: DotNetCore-Test demands: @@ -27,6 +30,9 @@ phases: variables: BuildConfig: Release OfficialBuildId: $(BUILD.BUILDNUMBER) + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 queue: name: DotNetCore-Build demands: @@ -48,6 +54,9 @@ phases: variables: BuildConfig: Release OfficialBuildId: $(BUILD.BUILDNUMBER) + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 _SignType: real _UseEsrpSigning: true _TeamName: DotNetCore @@ -96,12 +105,15 @@ phases: variables: BuildConfig: Release OfficialBuildId: $(BUILD.BUILDNUMBER) + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 _SignType: real _UseEsrpSigning: true _TeamName: DotNetCore + _NuGetFeedUrl: https://dotnet.myget.org/F/dotnet-core/api/v2/package _SymwebSymbolServerPath: https://microsoft.artifacts.visualstudio.com/DefaultCollection _MsdlSymbolServerPath: https://microsoftpublicsymbols.artifacts.visualstudio.com/DefaultCollection - _SymbolExpirationInDays: 30 queue: name: DotNetCore-Build demands: @@ -145,19 +157,18 @@ phases: msbuildVersion: 15.0 continueOnError: false - - task: NuGetCommand@2 - displayName: Publish Packages to VSTS Feed + - task: MSBuild@1 + displayName: Publish Packages to MyGet Feed inputs: - command: push - packagesToPush: $(Build.SourcesDirectory)/bin/packages/**/*.nupkg;!$(Build.SourcesDirectory)/bin/packages/**/*.symbols.nupkg - nuGetFeedType: internal - feedPublish: MachineLearning + solution: build/publish.proj + msbuildArguments: /t:PublishPackages /p:NuGetFeedUrl=$(_NuGetFeedUrl) /p:NuGetApiKey=$(dotnet-myget-org-api-key) + msbuildVersion: 15.0 - task: MSBuild@1 displayName: Publish Symbols to SymWeb Symbol Server inputs: solution: build/publish.proj - msbuildArguments: /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT) /p:SymbolExpirationInDays=$(_SymbolExpirationInDays) + msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT) msbuildVersion: 15.0 continueOnError: true @@ -165,6 +176,6 @@ phases: displayName: Publish Symbols to Msdl Symbol Server inputs: solution: build/publish.proj - msbuildArguments: /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT) /p:SymbolExpirationInDays=$(_SymbolExpirationInDays) + msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT) msbuildVersion: 15.0 continueOnError: true