From d45f0753b703f36160f51cc86fe92460553c9ec2 Mon Sep 17 00:00:00 2001 From: Damon Barry Date: Fri, 7 Jan 2022 17:14:46 -0800 Subject: [PATCH] Remove .NET Core install templates from pipelines (#5968) I believe we can finally remove the .NET Core install templates from our pipelines because either: 1. The pipelines are running on 1ES-hosted agents, which already have the latest version of .NET Core 2.1 and 3.1 installed 2. The pipelines are running on MS-hosted agents, which [already have recent version of .NET Core 2.1 and 3.1 installed](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-Readme.md#net-core-sdk) This change removes the templates and their references. The templates were installing a hard-coded, much older version of the SDK, and therefore missed the latest security patches and other fixes. I also updated the Functions binding project to replace some deprecated properties that were causing errors when built against the latest .NET Core SDK. Note that this PR does not remove the template that configures the default SDK on Linux. I tested the three pipelines impacted by this change: dotnet checkin, dotnet CI, and images release. ## Azure IoT Edge PR checklist: This checklist is used to make sure that common guidelines for a pull request are followed. ### General Guidelines and Best Practices - [X] I have read the [contribution guidelines](https://github.com/azure/iotedge#contributing). - [X] Title of the pull request is clear and informative. - [X] Description of the pull request includes a concise summary of the enhancement or bug fix. ### Testing Guidelines - [X] Pull request includes test coverage for the included changes. - Description of the pull request includes - [X] concise summary of tests added/modified - [X] local testing done. --- builds/checkin/dotnet.yaml | 1 - builds/ci/dotnet.yaml | 1 - builds/misc/images-release.yaml | 4 ---- builds/templates/dotnet2-globaljson.yaml | 2 +- builds/templates/dotnet3-globaljson.yaml | 2 +- builds/templates/install-dotnet2.yaml | 6 ------ builds/templates/install-dotnet3.yaml | 6 ------ ...rosoft.Azure.WebJobs.Extensions.EdgeHub.csproj | 8 +++++++- .../images/icon.png | Bin 0 -> 393 bytes 9 files changed, 9 insertions(+), 21 deletions(-) delete mode 100644 builds/templates/install-dotnet2.yaml delete mode 100644 builds/templates/install-dotnet3.yaml create mode 100644 edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/images/icon.png diff --git a/builds/checkin/dotnet.yaml b/builds/checkin/dotnet.yaml index 6090fbfc0e7..af19fde5f97 100644 --- a/builds/checkin/dotnet.yaml +++ b/builds/checkin/dotnet.yaml @@ -31,7 +31,6 @@ jobs: pool: vmImage: "ubuntu-18.04" steps: - - template: ../templates/install-dotnet3.yaml - task: Bash@3 displayName: Install Prerequisites inputs: diff --git a/builds/ci/dotnet.yaml b/builds/ci/dotnet.yaml index 342b489086a..954a8f37644 100644 --- a/builds/ci/dotnet.yaml +++ b/builds/ci/dotnet.yaml @@ -30,7 +30,6 @@ jobs: IotDevice3ConnStr2, IotHubConnStr2, IotHubMqttHeadCert - - template: ../templates/install-dotnet3.yaml - task: Bash@3 displayName: Install Prerequisites inputs: diff --git a/builds/misc/images-release.yaml b/builds/misc/images-release.yaml index 6262e7da5d9..f1f545479ba 100644 --- a/builds/misc/images-release.yaml +++ b/builds/misc/images-release.yaml @@ -12,15 +12,11 @@ stages: dependsOn: [] jobs: - job: BuildDotnetComponents - # This job is run on a hosted linux agent, which needs dotnet 2 and 3 installed as a manual step. # The code sign steps will fail unless we explicitly say to use dotnet 2 before. # This means we have to toggle back and forth between primary dotnet installations for the sign and build. # TODO: Investigate why we have to toggle primary installs on linux, when we didn't have to do this on windows (now removed). displayName: Build Dotnet Components steps: - # Dotnet 2 needed for codesign - - template: ../templates/install-dotnet2.yaml - - template: ../templates/install-dotnet3.yaml - template: ../templates/dotnet3-globaljson.yaml # use dotnet 3 as primary install for build # Build - task: ShellScript@2 diff --git a/builds/templates/dotnet2-globaljson.yaml b/builds/templates/dotnet2-globaljson.yaml index 834f56b6385..ac3bd9a90e0 100644 --- a/builds/templates/dotnet2-globaljson.yaml +++ b/builds/templates/dotnet2-globaljson.yaml @@ -4,4 +4,4 @@ steps: displayName: 'Use dotnet 2' inputs: targetType: 'inline' - script: 'dotnet new globaljson --force --sdk-version 2.2.207' + script: 'dotnet new globaljson --force --sdk-version 2.1' diff --git a/builds/templates/dotnet3-globaljson.yaml b/builds/templates/dotnet3-globaljson.yaml index 116eb0fa7ad..4e4c77a860c 100644 --- a/builds/templates/dotnet3-globaljson.yaml +++ b/builds/templates/dotnet3-globaljson.yaml @@ -4,4 +4,4 @@ steps: displayName: 'Use dotnet 3' inputs: targetType: 'inline' - script: 'dotnet new globaljson --force --sdk-version 3.1.202' + script: 'dotnet new globaljson --force --sdk-version 3.1' diff --git a/builds/templates/install-dotnet2.yaml b/builds/templates/install-dotnet2.yaml deleted file mode 100644 index f0a2e512695..00000000000 --- a/builds/templates/install-dotnet2.yaml +++ /dev/null @@ -1,6 +0,0 @@ -steps: - - task: UseDotNet@2 - displayName: Install .NET Core sdk - inputs: - packageType: sdk - version: 2.2.207 \ No newline at end of file diff --git a/builds/templates/install-dotnet3.yaml b/builds/templates/install-dotnet3.yaml deleted file mode 100644 index 011424886f0..00000000000 --- a/builds/templates/install-dotnet3.yaml +++ /dev/null @@ -1,6 +0,0 @@ -steps: - - task: UseDotNet@2 - displayName: Install .NET Core sdk - inputs: - packageType: sdk - version: 3.1.202 diff --git a/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/Microsoft.Azure.WebJobs.Extensions.EdgeHub.csproj b/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/Microsoft.Azure.WebJobs.Extensions.EdgeHub.csproj index 13baa7b6434..834d1cf55ba 100644 --- a/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/Microsoft.Azure.WebJobs.Extensions.EdgeHub.csproj +++ b/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/Microsoft.Azure.WebJobs.Extensions.EdgeHub.csproj @@ -18,14 +18,20 @@ Microsoft Azure Edge Function extension Microsoft true - https://github.com/Azure/iotedge/blob/master/LICENSE + LICENSE This package contains binding extensions for IoTEdge. http://go.microsoft.com/fwlink/?LinkID=288890 + icon.png https://github.com/Azure/iotedge © Microsoft Corporation. All rights reserved. IoT Microsoft Azure IoTEdge Functions + + + + + diff --git a/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/images/icon.png b/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/images/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1e58d764e3b2a499f3f2ed11f011688a5f715e1f GIT binary patch literal 393 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdl8)oCO|{#S9F5M?jcysy3fA0|TSA zr;B4q#jUru4YQaWMH(K~i?4QN`N&qb@r+{9YsMn+gPSWDZa?A5)X@p5Y;|BdJSpi~ zQpmAGS`+ph_#duq*6*LTv4T0RKC-y-N6cBqV~uIvlkXZbuZhoW)H@MV*|4QjOWy6O zc=7{nfd|YV>gwuP?k)PWf%i;<+=8zH|8y8xMFJcceI0=G1r`F#58F@uXWbC@(Ra$$ zTN<*fpF1zOY4qXk&CL?A>n%6@&CtC4A<*iB&0EGcajOKu7aZ?rr&ju3e}ACQBAoNV zw^@gkF63~oxBOubvoFAblaP%U-i7C{NIUf{bxP5No0n`4oPL!x<<)AI-wB()&a>^l a$oXleu8_#$?>m8E%i!ti=d#Wzp$P!^ypzZP literal 0 HcmV?d00001