forked from Azure/azure-functions-java-worker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
80 lines (78 loc) · 2.88 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
pool:
vmImage: 'vs2017-win2016'
steps:
- task: NuGetToolInstaller@0
inputs:
checkLatest: true
- pwsh: |
Get-Command mvn
displayName: 'Check Maven is installed'
- pwsh: |
$buildNumber = 0
if($env:APPVEYOR_REPO_TAG -eq "true") {
$buildNumber = $(Build.SourceBranchName)
Write-Host “Found git tag."
}
else {
$buildNumber = "1.5.3-$(Build.BuildId)"
Write-Host “git tag not found. Setting package suffix to '$buildNumber'"
}
.\package.ps1 -buildNumber $buildNumber
displayName: 'Executing build script'
- task: CopyFiles@2
inputs:
SourceFolder: '$(Build.Repository.LocalPath)/pkg'
Contents: '*.nupkg'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
displayName: 'Copying files for artifacts'
- pwsh: |
.\setup-tests-pipeline.ps1
displayName: 'Setting tests'
- pwsh: |
.\build-run-tests-pipeline.ps1
env:
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
displayName: 'Build & Run tests for java 8'
continueOnError: false
- pwsh: |
.\build-run-tests-pipeline.ps1
env:
JAVA_HOME: 'C:\Program Files\Java\zulu-11-azure-jdk_11.33.15-11.0.4-win_x64'
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
AzureWebJobsServiceBus: $(AzureWebJobsServiceBus)
AzureWebJobsEventHubSender_2: $(AzureWebJobsEventHubSender_2)
AzureWebJobsEventHubReceiver: $(AzureWebJobsEventHubReceiver)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsEventHubPath: $(AzureWebJobsEventHubPath)
SBTopicName: $(SBTopicName)
SBTopicSubName: $(SBTopicSubName)
CosmosDBDatabaseName: $(CosmosDBDatabaseName)
SBQueueName: $(SBQueueName)
displayName: 'Build & Run tests for java 11'
continueOnError: false
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/testResults'
Contents: '*.trx'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copying test result file for artifacts'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
displayName: 'Publishing build and test result artifacts'