Skip to content

Commit

Permalink
Update codebase to dotnet 3.1. (Azure#2996)
Browse files Browse the repository at this point in the history
Same PR as here:
Azure#2896

The above PR wouldn't merge due to too many commits. Reopening a new one.
  • Loading branch information
and-rewsmith authored May 22, 2020
1 parent b231c6a commit f87a18a
Show file tree
Hide file tree
Showing 218 changed files with 1,161 additions and 2,192 deletions.
41 changes: 30 additions & 11 deletions Microsoft.Azure.Devices.Edge.sln
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetricsValidator", "test\mo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdgeHubRestartTester", "test\modules\EdgeHubRestartTester\EdgeHubRestartTester.csproj", "{DA073067-83EF-4F4C-8E58-51CA7870C1F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CloudToDeviceMessageTester", "test\modules\CloudToDeviceMessageTester\CloudToDeviceMessageTester.csproj", "{446F50F3-3E93-454B-8EBF-4830E92DFE5D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudToDeviceMessageTester", "test\modules\CloudToDeviceMessageTester\CloudToDeviceMessageTester.csproj", "{446F50F3-3E93-454B-8EBF-4830E92DFE5D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{C077918C-9AD4-4F01-ADED-4B8B6AB784A2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnet", "dotnet", "{A6D8677F-DB76-459E-B6DE-110AFCEF7F08}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdgeDownstreamDevice", "samples\dotnet\EdgeDownstreamDevice\EdgeDownstreamDevice.csproj", "{7546DB89-643A-477F-AEE3-FA05BDCE4ACD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdgeX509AuthDownstreamDevice", "samples\dotnet\EdgeX509AuthDownstreamDevice\EdgeX509AuthDownstreamDevice.csproj", "{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -590,18 +598,10 @@ Global
{1C1C8203-CD73-4CC1-9112-7315F9DE1AB6}.Release|Any CPU.Build.0 = Release|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.CodeCoverage|Any CPU.ActiveCfg = CodeCoverage|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.CodeCoverage|Any CPU.Build.0 = CodeCoverage|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B3C68519-B309-42FF-B4DF-9E77B2D4BD50}.Release|Any CPU.Build.0 = Release|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.CheckInBuild|Any CPU.ActiveCfg = Debug|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.CheckInBuild|Any CPU.Build.0 = Debug|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Release|Any CPU.Build.0 = Release|Any CPU
{5857DB4A-F61A-4467-96F1-003B47B8B2CF}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{5857DB4A-F61A-4467-96F1-003B47B8B2CF}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{5857DB4A-F61A-4467-96F1-003B47B8B2CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -610,12 +610,28 @@ Global
{5857DB4A-F61A-4467-96F1-003B47B8B2CF}.Release|Any CPU.Build.0 = Release|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.CodeCoverage|Any CPU.ActiveCfg = CodeCoverage|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.CodeCoverage|Any CPU.Build.0 = CodeCoverage|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA073067-83EF-4F4C-8E58-51CA7870C1F6}.Release|Any CPU.Build.0 = Release|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{446F50F3-3E93-454B-8EBF-4830E92DFE5D}.Release|Any CPU.Build.0 = Release|Any CPU
{7546DB89-643A-477F-AEE3-FA05BDCE4ACD}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{7546DB89-643A-477F-AEE3-FA05BDCE4ACD}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{7546DB89-643A-477F-AEE3-FA05BDCE4ACD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7546DB89-643A-477F-AEE3-FA05BDCE4ACD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7546DB89-643A-477F-AEE3-FA05BDCE4ACD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7546DB89-643A-477F-AEE3-FA05BDCE4ACD}.Release|Any CPU.Build.0 = Release|Any CPU
{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -704,6 +720,9 @@ Global
{5857DB4A-F61A-4467-96F1-003B47B8B2CF} = {F921339B-32F9-4BF3-B364-2DB01FA2F1A1}
{DA073067-83EF-4F4C-8E58-51CA7870C1F6} = {F921339B-32F9-4BF3-B364-2DB01FA2F1A1}
{446F50F3-3E93-454B-8EBF-4830E92DFE5D} = {F921339B-32F9-4BF3-B364-2DB01FA2F1A1}
{A6D8677F-DB76-459E-B6DE-110AFCEF7F08} = {C077918C-9AD4-4F01-ADED-4B8B6AB784A2}
{7546DB89-643A-477F-AEE3-FA05BDCE4ACD} = {A6D8677F-DB76-459E-B6DE-110AFCEF7F08}
{9E809F78-0EFF-4860-94D1-8D0EF1A9C1F1} = {A6D8677F-DB76-459E-B6DE-110AFCEF7F08}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D71830F5-3AF5-46B4-8A9E-1DCE4F2253AC}
Expand Down
10 changes: 3 additions & 7 deletions builds/checkin/dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
pool:
vmImage: "ubuntu-16.04"
steps:
- template: ../templates/install-dotnet3.yaml
- task: Bash@3
displayName: Install
displayName: Install Prerequisites
inputs:
filePath: scripts/linux/installPrereqs.sh
arguments: -u $(NetCorePackageUriLinux)
- task: Bash@3
displayName: Build
inputs:
Expand All @@ -63,11 +63,7 @@ jobs:
pool:
vmImage: "vs2017-win2016"
steps:
- task: PowerShell@2
displayName: Install
inputs:
filePath: scripts/windows/setup/Install-Prerequisites.ps1
arguments: -DotnetSdkUrl $(NetCorePackageUriWindows) -Dotnet -Nuget
- template: ../templates/install-dotnet3.yaml
- task: PowerShell@2
displayName: Build
inputs:
Expand Down
19 changes: 5 additions & 14 deletions builds/ci/dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ trigger:
pr: none
variables:
build.configuration: Release
dotnet.version: 2.1.x
test.filter: Category=Integration&Category!=Stress
jobs:
- job: linux
Expand All @@ -32,15 +31,11 @@ jobs:
IotDevice3ConnStr2,
IotHubConnStr2,
IotHubMqttHeadCert
- task: UseDotNet@2
displayName: Install .NET Core sdk
- template: ../templates/install-dotnet3.yaml
- task: Bash@3
displayName: Install Prerequisites
inputs:
packageType: sdk
version: $(dotnet.version)
- script: |
sudo apt-get update
sudo apt-get install -y libsnappy1v5
displayName: Install libsnappy1v5 # Needed for rocksdb integration tests
filePath: scripts/linux/installPrereqs.sh
- pwsh: |
$store = [System.Security.Cryptography.X509Certificates.X509Store]::new('Root', 'CurrentUser')
$store.Open('ReadWrite')
Expand Down Expand Up @@ -111,11 +106,7 @@ jobs:
IotDevice3ConnStr2,
IotHubConnStr2,
IotHubMqttHeadCert
- task: UseDotNet@2
displayName: Install .NET Core sdk
inputs:
packageType: sdk
version: $(dotnet.version)
- template: ../templates/install-dotnet3.yaml
- powershell: scripts/windows/build/Publish-Branch.ps1 -Configuration $(Build.Configuration) -UpdateVersion
displayName: Build
- powershell: scripts/windows/test/Test-Branch.ps1 -Filter "$(test.filter)&Category!=Kubernetes" -BuildConfig $(Build.Configuration)
Expand Down
2 changes: 1 addition & 1 deletion builds/e2e/templates/e2e-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ steps:
$testDir = '$(Build.SourcesDirectory)/test/Microsoft.Azure.Devices.Edge.Test'
dotnet build $testDir
$binDir = Convert-Path "$testDir/bin/Debug/netcoreapp2.1"
$binDir = Convert-Path "$testDir/bin/Debug/netcoreapp3.1"
Write-Output "##vso[task.setvariable variable=binDir]$binDir"
displayName: Build tests

Expand Down
168 changes: 4 additions & 164 deletions builds/misc/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,170 +7,15 @@ trigger:
pr: none

jobs:
################################################################################
- job: linux_dotnet_projects_arm64
################################################################################
displayName: LinuxDotnet ARM64
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UseDotNet@2
displayName: Install .NET Core sdk
inputs:
packageType: sdk
version: 3.0.x

- bash: 'docker login $(registry.address) --username $(registry.user) --password $(registry.password)'
displayName: 'Docker Login'

- script: scripts/linux/buildBranch.sh -c $(Build.Configuration) --no-rocksdb-bin --os Unix --dotnet_runtime netcoreapp3.0
name: build
displayName: Build ($(Build.Configuration))

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
PathtoPublish: '$(Build.BinariesDirectory)/publish'
ArtifactName: 'core-linux'

# Edge Agent - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Edge Agent - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-agent -n microsoft -P Microsoft.Azure.Devices.Edge.Agent.Service --target-arch aarch64

# Edge Hub - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Edge Hub - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-hub -n microsoft -P Microsoft.Azure.Devices.Edge.Hub.Service --target-arch aarch64

# Simulated Temperature Sensor - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Temperature Sensor - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-simulated-temperature-sensor -n microsoft -P SimulatedTemperatureSensor --target-arch aarch64

# Temperature Filter - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Temperature Filter - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-temperature-filter -n microsoft -P TemperatureFilter --target-arch aarch64

# Load Gen - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Load Gen - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-load-gen -n microsoft -P load-gen --target-arch aarch64

# Test Analyzer - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Test Analyzer - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-analyzer -n microsoft -P TestAnalyzer --target-arch aarch64

# Functions Sample - Not Using Template for ARM64 because we have 2 different .NET Core.//TODO: Enable this once Functions supports arm64v8. Right now they are not ready.
#- task: Bash@3
# displayName: Build Image - Functions Sample - aarch64
# inputs:
# filePath: scripts/linux/buildImage.sh
# arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-functions-filter -n azureiotedge -P EdgeHubTriggerCSharp --target-arch aarch64

# Direct Method Sender - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Direct Method Sender - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-direct-method-sender -n microsoft -P DirectMethodSender --target-arch aarch64

# Direct Method Receiver - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Direct Method Receiver - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-direct-method-receiver -n microsoft -P DirectMethodReceiver --target-arch aarch64

# Metrics Validator - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Metrics Validator - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-metrics-validator -n microsoft -P MetricsValidator --target-arch aarch64

# Module Restarter - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Module Restarter - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-module-restarter -n microsoft -P ModuleRestarter --target-arch aarch64

# Twin Tester - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Twin Tester - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-twin-tester -n microsoft -P TwinTester --target-arch aarch64

# Relayer - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Relayer - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-relayer -n microsoft -P Relayer --target-arch aarch64

# Metrics Collector - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Metrics Collector - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-metrics-collector -n microsoft -P MetricsCollector --target-arch aarch64

# TestResultCoordinator - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Test Result Coordinator - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-test-result-coordinator -n microsoft -P TestResultCoordinator --target-arch aarch64

# DeploymentTester - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Deployment Tester - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-deployment-tester -n microsoft -P DeploymentTester --target-arch aarch64

# EdgeHubRestartTester - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - EdgeHub Restart Tester - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-edgehub-restart-tester -n microsoft -P EdgeHubRestartTester --target-arch aarch64

# CloudToDeviceMessageTester - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Cloud To Device Message Receiver Tester - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-c2dmessage-tester -n microsoft -P CloudToDeviceMessageTester --target-arch aarch64

################################################################################
- job: linux_dotnet_projects
################################################################################
displayName: LinuxDotnet
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core sdk'
inputs:
packageType: sdk
version: 2.1.x
- template: ../templates/install-dotnet3.yaml

- bash: 'docker login $(registry.address) --username $(registry.user) --password $(registry.password)'
displayName: 'Docker Login'

Expand Down Expand Up @@ -229,7 +74,7 @@ jobs:
imageName: azureiotedge-analyzer
project: TestAnalyzer

# Functions Sample
# Functions Sample - Not supported on linux arm64
- template: templates/image-linux.yaml
parameters:
name: Functions Sample
Expand Down Expand Up @@ -356,12 +201,8 @@ jobs:
- win-rs5
workspace:
clean: all
variables:
NetCorePackageUri: https://download.microsoft.com/download/4/0/9/40920432-3302-47a8-b13c-bbc4848ad114/dotnet-sdk-2.1.302-win-x64.zip
steps:
- powershell: scripts/windows/setup/Install-Prerequisites.ps1 -DotnetSdkUrl $(NetCorePackageUri) -Dotnet -Nuget
name: install
displayName: Install
- template: ../templates/install-dotnet3.yaml

- script: echo $(registry.password)|docker login "edgebuilds.azurecr.io" -u "$(registry.user)" --password-stdin
displayName: Docker Login
Expand Down Expand Up @@ -526,7 +367,6 @@ jobs:
vmImage: 'ubuntu-16.04'
dependsOn:
- linux_dotnet_projects
- linux_dotnet_projects_arm64
- linux_rust_amd64
- linux_rust_arm32
- linux_rust_arm64
Expand Down
Loading

0 comments on commit f87a18a

Please sign in to comment.