Skip to content

Commit

Permalink
update task to install .NET (#686)
Browse files Browse the repository at this point in the history
* update task to install .NET

* update e2e test project to .net6.0

* update e2e .net version
  • Loading branch information
kaibocai authored Dec 12, 2022
1 parent 45c6f93 commit 206311b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
13 changes: 4 additions & 9 deletions azure-pipelines-e2e-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,10 @@ jobs:
java -version
displayName: 'Check default java version'
- pwsh: |
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100-rc.2.21505.57" -Channel 'release'
displayName: 'Install the .Net version used by the Core Tools for Windows'
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- bash: |
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
displayName: 'Install the .Net version used by the Core Tools for Linux'
condition: eq( variables['Agent.OS'], 'Linux' )
- task: UseDotNet@2
displayName: 'Install .NET 6'
inputs:
version: 6.0.x

- pwsh: |
.\setup-tests-pipeline.ps1 -UseCoreToolsBuildFromIntegrationTests
Expand Down
15 changes: 4 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,10 @@ jobs:
- pwsh: |
.\package-pipeline.ps1 -buildNumber $(buildNumber)
displayName: 'Executing build script'
- pwsh: |
Invoke-WebRequest 'https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
./dotnet-install.ps1 -InstallDir "$env:ProgramFiles/dotnet" -Version "6.0.100-rc.2.21505.57" -Channel 'release'
displayName: 'Install the .Net version used by the Core Tools for Windows'
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- bash: |
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
displayName: 'Install the .Net version used by the Core Tools for Linux'
condition: eq( variables['Agent.OS'], 'Linux' )
- task: UseDotNet@2
displayName: 'Install .NET 6'
inputs:
version: 6.0.x
- pwsh: | # Download JDK for later installation
Invoke-WebRequest $(JDK_DOWNLOAD_LINK) -O "$(JAVA_VERSION).tar.gz"
$current = get-location | select -ExpandProperty Path
Expand Down Expand Up @@ -180,14 +175,12 @@ jobs:
- pwsh: |
$currDir = Get-Location
$Env:Path = $Env:Path+";$currDir/Azure.Functions.Cli"
ls $currDir/Azure.Functions.Cli
func --version
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: 'Setup Core Tools - Windows'
- bash: |
chmod +x ./Azure.Functions.Cli/func
chmod +x ./Azure.Functions.Cli/gozip
ls ./Azure.Functions.Cli
export PATH=$PATH:./Azure.Functions.Cli
func --version
condition: eq( variables['Agent.OS'], 'Linux' )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down

0 comments on commit 206311b

Please sign in to comment.