From d1fb68819aedb4948b8a59c2b1f10483eccdd0f5 Mon Sep 17 00:00:00 2001 From: Ryan Lengel Isgrig Date: Wed, 7 Jul 2021 15:08:41 -0700 Subject: [PATCH 1/2] pull netcore install steps to build-test and package separately --- build/yaml/templates/component-template.yml | 2 -- build/yaml/templates/dotnet-build-test-steps.yml | 10 ++++++++++ build/yaml/templates/dotnet-install-sdk-steps.yml | 10 ---------- build/yaml/templates/dotnet-package-steps.yml | 5 +++++ 4 files changed, 15 insertions(+), 12 deletions(-) delete mode 100644 build/yaml/templates/dotnet-install-sdk-steps.yml diff --git a/build/yaml/templates/component-template.yml b/build/yaml/templates/component-template.yml index bd27ea611e..935cd64a04 100644 --- a/build/yaml/templates/component-template.yml +++ b/build/yaml/templates/component-template.yml @@ -31,7 +31,6 @@ stages: - job: build_test_dotnet displayName: Build and test .csproj with dotnet steps: - - template: dotnet-install-sdk-steps.yml - template: dotnet-build-test-steps.yml - stage: stage_package_nuget @@ -44,7 +43,6 @@ stages: condition: eq(variables.ComponentType, 'codeExtension') steps: - template: nuget-versioning-steps.yml - - template: dotnet-install-sdk-steps.yml - template: dotnet-package-steps.yml - template: nuget-signing-steps.yml - job: job_pack_nuspec diff --git a/build/yaml/templates/dotnet-build-test-steps.yml b/build/yaml/templates/dotnet-build-test-steps.yml index cf6901e5b2..6a6c0e7bc5 100644 --- a/build/yaml/templates/dotnet-build-test-steps.yml +++ b/build/yaml/templates/dotnet-build-test-steps.yml @@ -1,4 +1,14 @@ steps: +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 2.1.x' + inputs: + version: 2.1.x + +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 3.1.x' + inputs: + version: 3.1.x + - task: DotNetCoreCLI@2 displayName: 'Run `dotnet restore`' inputs: diff --git a/build/yaml/templates/dotnet-install-sdk-steps.yml b/build/yaml/templates/dotnet-install-sdk-steps.yml deleted file mode 100644 index 772e09f578..0000000000 --- a/build/yaml/templates/dotnet-install-sdk-steps.yml +++ /dev/null @@ -1,10 +0,0 @@ -steps: -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 2.1.x' - inputs: - version: 2.1.x - -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 3.1.x' - inputs: - version: 3.1.x diff --git a/build/yaml/templates/dotnet-package-steps.yml b/build/yaml/templates/dotnet-package-steps.yml index 49e0a39302..106b8caa7e 100644 --- a/build/yaml/templates/dotnet-package-steps.yml +++ b/build/yaml/templates/dotnet-package-steps.yml @@ -1,4 +1,9 @@ steps: +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 2.1.x' + inputs: + version: 2.1.x + - task: DotNetCoreCLI@2 displayName: 'Run `dotnet publish`' inputs: From b8afa213242cad3c7bf2ccfd5cab7d1af3c08991 Mon Sep 17 00:00:00 2001 From: Ryan Lengel Isgrig Date: Wed, 7 Jul 2021 15:17:37 -0700 Subject: [PATCH 2/2] remove netcore step from signing as it is used in packaging --- build/yaml/templates/nuget-signing-steps.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build/yaml/templates/nuget-signing-steps.yml b/build/yaml/templates/nuget-signing-steps.yml index 5e08c14ebe..269af981c7 100644 --- a/build/yaml/templates/nuget-signing-steps.yml +++ b/build/yaml/templates/nuget-signing-steps.yml @@ -2,11 +2,6 @@ # Extra steps are required to sign the binaries of the code extensions. steps: -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 2.1.x' - inputs: - version: 2.1.x - - task: CopyFiles@2 displayName: 'Copy packages to Signing' inputs: