-
Notifications
You must be signed in to change notification settings - Fork 13
/
ci.yml
153 lines (137 loc) · 5.04 KB
/
ci.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
trigger:
branches:
include:
- master
- feature/*
- release/*
- hotfix/*
pr:
branches:
include:
- master
- feature/*
- release/*
- hotfix/*
extends:
template: /eng/templates/1es-redirect.yml
parameters:
stages:
- stage: Build
variables:
- name: DefaultOptions
value: '--batch-mode --fail-at-end -Dmaven.wagon.http.pool=false'
- name: LoggingOptions
value: '-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
- name: MemoryOptions
value: '-Xmx3072m'
- template: /eng/templates/image.yml
jobs:
- job: 'Build'
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux
strategy:
matrix:
Java 8:
ArtifactName: 'java8-packages'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
# We name this 'packages' because it is the default version we want to ship with.
Java LTS:
ArtifactName: 'packages'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
steps:
- task: Maven@3
displayName: 'Build and Package'
inputs:
mavenPomFile: 'pom.xml'
goals: 'deploy'
options: '$(DefaultOptions) $(ProfileFlag) -T 1C -DskipTests -Dgpg.skip -Dcheckstyle.skip=true -Dspotbugs.skip=true --settings eng/settings.xml -DaltDeploymentRepository="local::default::file:///${project.basedir}/output"'
mavenOptions: '$(LoggingOptions) $(MemoryOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
- task: Maven@3
displayName: 'Run SpotBugs, Checkstyle, and Javadoc'
inputs:
mavenPomFile: pom.xml
options: '$(DefaultOptions) --no-transfer-progress -DskipTests -Dgpg.skip'
mavenOptions: '$(MemoryOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'verify'
- script: |
cp output/com/microsoft/azure/qpid-proton-j-extensions/**/* $(Build.ArtifactStagingDirectory)
rm $(Build.ArtifactStagingDirectory)/*.sha1
rm $(Build.ArtifactStagingDirectory)/*.md5
displayName: Flatten and copy build outputs
- task: 1ES.PublishPipelineArtifact@1
displayName: 'Publish outputs to $(ArtifactName) artifact'
inputs:
artifactName: $(ArtifactName)
targetPath: $(Build.ArtifactStagingDirectory)
- job:
displayName: 'Test'
strategy:
matrix:
Linux - Java 8:
OSName: 'Linux'
OSVmImage: 'ubuntu-22.04'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
Linux - Java LTS:
OSName: 'Linux'
OSVmImage: 'ubuntu-22.04'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux
steps:
- template: /eng/templates/test-steps.yml
- job:
displayName: 'Test'
strategy:
matrix:
Windows - Java 8:
OSName: 'Windows'
OSVmImage: 'windows-2022'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
Windows - Java LTS:
OSName: 'Windows'
OSVmImage: 'windows-2022'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
steps:
- template: /eng/templates/test-steps.yml
- job:
displayName: 'Test'
strategy:
matrix:
macOS - Java 8:
OSName: 'macOS'
OSVmImage: 'macOS-13'
ProfileFlag: '-Djava8'
JavaVersion: '1.8'
macOS - Java LTS:
OSName: 'macOS'
OSVmImage: 'macOS-13'
ProfileFlag: '-Djava-lts'
JavaVersion: '1.11'
pool:
name: $(MACPOOL)
vmImage: $(MACVMIMAGE)
os: macOS
steps:
- template: /eng/templates/test-steps.yml