-
Notifications
You must be signed in to change notification settings - Fork 17
/
azure-pipelines.yml
43 lines (39 loc) · 1.23 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
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'SonarCloud'
organization: 'dodie'
scannerMode: 'Other'
- task: Maven@3
displayName: 'Build and scan core package on Java 11'
inputs:
mavenPomFile: 'scott/pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
sonarQubeRunAnalysis: true
- task: Docker@2
displayName: 'Build and test on Java 17'
inputs:
command: run
arguments: -t --rm -v "$(Build.SourcesDirectory)":/usr/src/mymaven -v "$(Agent.HomeDirectory)/.m2":/root/.m2 -v "$(Build.SourcesDirectory)/target:/usr/src/mymaven/target" -w /usr/src/mymaven maven:3.6.3-openjdk-17 mvn install
- script: |
cd scott-gradle-plugin
chmod +x ./gradlew
./gradlew build
displayName: 'Gradle Plugin'
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'