From 72fe8e071687ea4c5b7dc6c9eff2c7dc2af64613 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Mon, 7 Dec 2020 15:09:30 -0800 Subject: [PATCH 1/5] Fixed SampleUtils --- .../Microsoft.ML.SamplesUtils.csproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj index 2e6ed18567..6ae79c9a58 100644 --- a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj +++ b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj @@ -5,6 +5,11 @@ netstandard2.0 Microsoft.ML.SampleUtils Sample utils for Microsoft.ML.Samples + + + Microsoft.ML.SampleUtils From d0c27503f1d8320567d8666e484a530f1058458c Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Mon, 7 Dec 2020 15:14:14 -0800 Subject: [PATCH 2/5] Updated vsts-ci to use azure tasks to publish, and optional arcade variables to name packages --- build/vsts-ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/build/vsts-ci.yml b/build/vsts-ci.yml index 29ea7d5035..744af052d5 100644 --- a/build/vsts-ci.yml +++ b/build/vsts-ci.yml @@ -189,6 +189,7 @@ phases: variables: BuildConfig: Release OfficialBuildId: $(BUILD.BUILDNUMBER) + DotnetVersionKind: $[variables.VERSIONKIND] # If not "VERSIONKIND" variable is set when queuing the publishing task, this defaults to empty string. DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_MULTILEVEL_LOOKUP: 0 @@ -230,10 +231,14 @@ phases: sourceFolder: $(Build.SourcesDirectory)/artifacts/pkgassets/PackageAssets targetFolder: $(Build.SourcesDirectory)/artifacts/pkgassets - - script: ./build.cmd -pack -configuration $(BuildConfig) + # Depending on the value of DotNetFinalVersionKind, the name of the package will change. + # For our nightly builds we want it to be empty, and when creating the official nugets, we want it to be "release" + # the value of the version kind is set when queuing the publishing job on AzureDevOps by adding a VERSIONKIND variable + # See more info in: https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md#package-version + - script: ./build.cmd -configuration $(BuildConfig) -pack -ci /p:OfficialBuildId=$(OfficialBuildId) /p:DotNetFinalVersionKind=$(DotnetVersionKind) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages displayName: Build Packages - - script: ./sign.cmd /p:SignNugetPackages=true + - script: ./sign.cmd /p:SignNugetPackages=true /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages displayName: sign packages continueOnError: false @@ -241,14 +246,20 @@ phases: inputs: nuGetServiceConnections: machinelearning-dnceng-public-feed # To allow publishing to a feed of another organization - - script: $(Build.SourcesDirectory)\.dotnet\dotnet.exe msbuild build\publish.proj /t:PublishPackages /p:NuGetFeedUrl=$(_AzureDevopsFeedUrl) /p:NuGetApiKey=AzureArtifacts - displayName: Publish Packages to AzureDevOps Feed + - task: NuGetCommand@2 + displayName: Push packages to AzureDevOps feed + inputs: + command: push + packagesToPush: $(Build.SourcesDirectory)/artifacts/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/**/*.snupkg + nuGetFeedType: external + publishFeedCredentials: machinelearning-dnceng-public-feed + allowPackageConflicts: true - task: MSBuild@1 displayName: Publish Symbols to SymWeb Symbol Server inputs: solution: build/publish.proj - msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT) + msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages msbuildVersion: 15.0 continueOnError: true @@ -256,7 +267,7 @@ phases: displayName: Publish Symbols to Msdl Symbol Server inputs: solution: build/publish.proj - msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT) + msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages msbuildVersion: 15.0 continueOnError: true From a7319e2c7dc0e38f7df30e1be75311acf41bc249 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Mon, 7 Dec 2020 15:15:43 -0800 Subject: [PATCH 3/5] Remove unused task and BuiltTools dependency --- build/publish.proj | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/build/publish.proj b/build/publish.proj index 9ac58604ef..47849ca21b 100644 --- a/build/publish.proj +++ b/build/publish.proj @@ -1,13 +1,7 @@ - - - - - - Microsoft.SymbolUploader.Build.Task true @@ -15,37 +9,6 @@ - - - - - - - - - - - Pushing took too long - - - - - - - $(MSBuildThisFileDirectory)..\.dotnet\dotnet - $(DotnetToolCommand) nuget push --source $(NuGetFeedUrl) --api-key $(NuGetApiKey) --timeout $(NuGetPushTimeoutSeconds) - - - - Date: Mon, 7 Dec 2020 15:20:15 -0800 Subject: [PATCH 4/5] Remove allowPackageConflicts parameter in NugetCommand --- build/vsts-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/build/vsts-ci.yml b/build/vsts-ci.yml index 744af052d5..be0798d105 100644 --- a/build/vsts-ci.yml +++ b/build/vsts-ci.yml @@ -253,7 +253,6 @@ phases: packagesToPush: $(Build.SourcesDirectory)/artifacts/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/**/*.snupkg nuGetFeedType: external publishFeedCredentials: machinelearning-dnceng-public-feed - allowPackageConflicts: true - task: MSBuild@1 displayName: Publish Symbols to SymWeb Symbol Server From a0b999f826ac48af58c4f949517a5469f7f4097e Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Mon, 7 Dec 2020 15:48:51 -0800 Subject: [PATCH 5/5] Nit typo --- build/vsts-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/vsts-ci.yml b/build/vsts-ci.yml index be0798d105..c4d22c5c28 100644 --- a/build/vsts-ci.yml +++ b/build/vsts-ci.yml @@ -189,7 +189,7 @@ phases: variables: BuildConfig: Release OfficialBuildId: $(BUILD.BUILDNUMBER) - DotnetVersionKind: $[variables.VERSIONKIND] # If not "VERSIONKIND" variable is set when queuing the publishing task, this defaults to empty string. + DotnetVersionKind: $[variables.VERSIONKIND] # If no "VERSIONKIND" variable is set when queuing the publishing task, this defaults to empty string. DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_MULTILEVEL_LOOKUP: 0