forked from MicrosoftDocs/pipelines-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.Gradle.yml
38 lines (33 loc) · 1.15 KB
/
azure-pipelines.Gradle.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
# Gradle
# Build your Java projects and run tests with Gradle using a Gradle wrapper script.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.10'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
tasks: 'build'
# Publish Cobertura or JaCoCo code coverage results from a build
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/reports/code-cov-report.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/reports/code-cov-report.html'
failIfCoverageEmpty: true
- task: CopyFiles@2
inputs:
contents: '**/helloworld*.jar'
targetFolder: '$(build.artifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
artifactName: 'jars'
pathToPublish: '$(build.artifactStagingDirectory)'