From e2894c5ffbd993b5b1ff61ac751f244fa443e90d Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Thu, 5 Mar 2020 17:10:55 -0800 Subject: [PATCH] Fix package name overrides (#3150) Add env var with the package name. --- .../nuget/cpu-esrp-featruizers-pipeline.yml | 3 +++ .../nuget/templates/cpu-featurizers.yml | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/nuget/cpu-esrp-featruizers-pipeline.yml b/tools/ci_build/github/azure-pipelines/nuget/cpu-esrp-featruizers-pipeline.yml index 062769ec14..870b232a03 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/cpu-esrp-featruizers-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/cpu-esrp-featruizers-pipeline.yml @@ -6,6 +6,9 @@ schedules: - master always: true +variables: + PackageName: 'Microsoft.ML.ORTFeaturizers' + jobs: - template: templates/cpu-featurizers.yml parameters: diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/cpu-featurizers.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/cpu-featurizers.yml index c9dfb65c38..91c066a081 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/cpu-featurizers.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/cpu-featurizers.yml @@ -1,8 +1,7 @@ parameters: DoEsrp: 'false' - PackageNameManaged: 'Microsoft.ML.OnnxRuntime.Managed' - PackageName: 'Microsoft.ML.ORTFeaturizers' DoCompliance: 'false' + PackageName: 'Microsoft.ML.ORTFeaturizers' jobs: - template: ../../templates/win-ci-2019.yml @@ -18,8 +17,9 @@ jobs: DoNugetPack : 'true' DoCompliance: ${{ parameters.DoCompliance }} DoEsrp: ${{ parameters.DoEsrp }} + OrtPackageId: 'Microsoft.ML.ORTFeaturizers' NuPackScript: | - msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=$(PackageName) + msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.ORTFeaturizers copy $(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory) copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory) mkdir $(Build.ArtifactStagingDirectory)\testdata @@ -38,8 +38,9 @@ jobs: DoNugetPack : 'true' DoCompliance: ${{ parameters.DoCompliance }} DoEsrp: ${{ parameters.DoEsrp }} + OrtPackageId: 'Microsoft.ML.ORTFeaturizers' NuPackScript: | - msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=x86 /t:CreatePackage /p:OrtPackageId=$(PackageName) + msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=x86 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.ORTFeaturizers cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\ ren *.nupkg win-x86.zip copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*zip $(Build.ArtifactStagingDirectory) @@ -185,7 +186,7 @@ jobs: condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme inputs: command: 'push' - packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/$(PackageName).$(NuGetPackageVersionNumber).nupkg' + packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.ORTFeaturizers.$(NuGetPackageVersionNumber).nupkg' publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7' - task: NuGetCommand@2 @@ -193,6 +194,6 @@ jobs: condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme inputs: command: 'push' - packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/$(PackageNameManaged).$(NuGetPackageVersionNumber).nupkg' + packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.Managed.$(NuGetPackageVersionNumber).nupkg' publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'