74 строки
3.1 KiB
YAML
74 строки
3.1 KiB
YAML
trigger:
|
|
tags:
|
|
include:
|
|
- '*'
|
|
branches:
|
|
include:
|
|
- dev
|
|
pr:
|
|
branches:
|
|
include:
|
|
- dev
|
|
- master
|
|
|
|
|
|
jobs:
|
|
- job: "Build_And_Test_Java_Library_Windows"
|
|
pool:
|
|
name: '1ES-Hosted-AzFunc'
|
|
demands:
|
|
- ImageOverride -equals MMS2019TLS
|
|
|
|
steps:
|
|
- task: NuGetToolInstaller@1
|
|
inputs:
|
|
checkLatest: true
|
|
- 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' )
|
|
|
|
- pwsh: '& .\build.ps1'
|
|
displayName: 'Build project with java core library'
|
|
- pwsh: |
|
|
$currDir = Get-Location
|
|
$Env:Path = $Env:Path+";$currDir\Azure.Functions.Cli"
|
|
ls $currDir\Azure.Functions.Cli
|
|
func --version
|
|
cd ./azure-functions-java-worker/endtoendtests
|
|
mvn clean package `-Dmaven`.javadoc`.skip=true `-Dmaven`.test`.skip `-Dorg`.slf4j`.simpleLogger`.log`.org`.apache`.maven`.cli`.transfer`.Slf4jMavenTransferListener=warn `-B
|
|
Copy-Item "confluent_cloud_cacert.pem" ".\target\azure-functions\azure-functions-java-endtoendtests"
|
|
displayName: 'Package Java for E2E'
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: 'test'
|
|
projects: |
|
|
azure-functions-java-worker\endtoendtests\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E\Azure.Functions.Java.Tests.E2E.csproj
|
|
env:
|
|
AzureWebJobsStorage: $(AzureWebJobsStorage)
|
|
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
|
|
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
|
|
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
|
|
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
|
|
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
|
|
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
|
|
SBTopicName: $(SBTopicName)
|
|
SBTopicSubName: $(SBTopicSubName)
|
|
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
|
|
SBQueueName: $(SBQueueName)
|
|
BrokerList": $(BrokerList)
|
|
ConfluentCloudUsername: $(ConfluentCloudUsername)
|
|
ConfluentCloudPassword: $(ConfluentCloudPassword)
|
|
AzureWebJobsEventGridOutputBindingTopicUriString: $(AzureWebJobsEventGridOutputBindingTopicUriString)
|
|
AzureWebJobsEventGridOutputBindingTopicKeyString: $(AzureWebJobsEventGridOutputBindingTopicKeyString)
|
|
displayName: 'Build & Run tests for java 8' |