diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5f5f0a5..e586fae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,6 +15,8 @@ pr: jobs: - job: "Build_And_Test_Java_Library_Windows" + variables: + ApplicationInsightAgentVersion: 3.4.16 pool: name: '1ES-Hosted-AzFunc' demands: @@ -24,20 +26,17 @@ jobs: - task: NuGetToolInstaller@1 inputs: checkLatest: true + displayName: 'Install NuGet Tool' + - pwsh: | Write-Host "Java_HOME: $JAVA_HOME" Get-Command mvn displayName: 'Check Maven is installed' - - 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: '& .\build.ps1' displayName: 'Build project with java library' @@ -74,4 +73,7 @@ jobs: ConfluentCloudPassword: $(ConfluentCloudPassword) AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString) AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString) + ApplicationInsightAPIKey: $(ApplicationInsightAPIKey) + ApplicationInsightAPPID: $(ApplicationInsightAPPID) + ApplicationInsightAgentVersion: $(ApplicationInsightAgentVersion) displayName: 'Build & Run tests for java 8'