Skip to content

Commit 206311b

Browse files
authored
update task to install .NET (#686)
* update task to install .NET * update e2e test project to .net6.0 * update e2e .net version
1 parent 45c6f93 commit 206311b

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

azure-pipelines-e2e-integration-tests.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,10 @@ jobs:
7070
java -version
7171
displayName: 'Check default java version'
7272
73-
- pwsh: |
74-
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
75-
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100-rc.2.21505.57" -Channel 'release'
76-
displayName: 'Install the .Net version used by the Core Tools for Windows'
77-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
78-
- bash: |
79-
curl -sSL https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh | bash /dev/stdin -v '6.0.100-rc.2.21505.57' -c 'release' --install-dir /usr/share/dotnet
80-
displayName: 'Install the .Net version used by the Core Tools for Linux'
81-
condition: eq( variables['Agent.OS'], 'Linux' )
73+
- task: UseDotNet@2
74+
displayName: 'Install .NET 6'
75+
inputs:
76+
version: 6.0.x
8277

8378
- pwsh: |
8479
.\setup-tests-pipeline.ps1 -UseCoreToolsBuildFromIntegrationTests

azure-pipelines.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,10 @@ jobs:
139139
- pwsh: |
140140
.\package-pipeline.ps1 -buildNumber $(buildNumber)
141141
displayName: 'Executing build script'
142-
- pwsh: |
143-
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
144-
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100-rc.2.21505.57" -Channel 'release'
145-
displayName: 'Install the .Net version used by the Core Tools for Windows'
146-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
147-
- bash: |
148-
curl -sSL https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh | bash /dev/stdin -v '6.0.100-rc.2.21505.57' -c 'release' --install-dir /usr/share/dotnet
149-
displayName: 'Install the .Net version used by the Core Tools for Linux'
150-
condition: eq( variables['Agent.OS'], 'Linux' )
142+
- task: UseDotNet@2
143+
displayName: 'Install .NET 6'
144+
inputs:
145+
version: 6.0.x
151146
- pwsh: | # Download JDK for later installation
152147
Invoke-WebRequest $(JDK_DOWNLOAD_LINK) -O "$(JAVA_VERSION).tar.gz"
153148
$current = get-location | select -ExpandProperty Path
@@ -180,14 +175,12 @@ jobs:
180175
- pwsh: |
181176
$currDir = Get-Location
182177
$Env:Path = $Env:Path+";$currDir/Azure.Functions.Cli"
183-
ls $currDir/Azure.Functions.Cli
184178
func --version
185179
condition: eq( variables['Agent.OS'], 'Windows_NT' )
186180
displayName: 'Setup Core Tools - Windows'
187181
- bash: |
188182
chmod +x ./Azure.Functions.Cli/func
189183
chmod +x ./Azure.Functions.Cli/gozip
190-
ls ./Azure.Functions.Cli
191184
export PATH=$PATH:./Azure.Functions.Cli
192185
func --version
193186
condition: eq( variables['Agent.OS'], 'Linux' )

endtoendtests/Azure.Functions.Java.Tests.E2E/Azure.Functions.Java.Tests.E2E/Azure.Functions.Java.Tests.E2E.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)