-
Notifications
You must be signed in to change notification settings - Fork 141
/
azure-pipelines.yml
47 lines (40 loc) · 1.25 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
pool:
vmImage: 'ubuntu-latest'
variables:
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle
steps:
- task: CacheBeta@0
inputs:
key: $(Agent.OS)
path: $(GRADLE_USER_HOME)
displayName: "Gradle: setup build cache"
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'apollo-rsps-sonarcloud'
organization: 'apollo-rsps'
scannerMode: 'Other'
displayName: "SonarCloud: prepare analysis"
- task: Gradle@2
displayName: "Gradle: build"
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m -Dorg.gradle.parallel=true -Dorg.gradle.caching=true -Dsonar.host.url=https://sonarcloud.io'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
tasks: 'check jacocoTestReport sonarqube'
- script: |
./gradlew --stop
displayName: "Gradle: stop daemon"
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
displayName: "SonarCloud: publish quality gate"
- script: |
bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}"
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
displayName: "Codecov: publish coverage"