2020-05-01 14:15:42 -04:00
|
|
|
trigger:
|
2020-05-02 10:00:03 -04:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
linux:
|
|
|
|
imageName: "ubuntu-16.04"
|
2020-05-04 14:30:53 -04:00
|
|
|
# mac:
|
|
|
|
# imageName: "macos-10.14"
|
|
|
|
# windows:
|
|
|
|
# imageName: "vs2017-win2016"
|
2020-05-02 10:00:03 -04:00
|
|
|
maxParallel: 3
|
2020-05-01 14:15:42 -04:00
|
|
|
|
|
|
|
pool:
|
2020-05-02 10:00:03 -04:00
|
|
|
vmImage: $(imageName)
|
|
|
|
|
|
|
|
variables:
|
|
|
|
currentImage: $(imageName)
|
2020-05-01 14:15:42 -04:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2020-05-02 10:00:03 -04:00
|
|
|
- task: PowerShell@2
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: |
|
|
|
|
[xml]$pomXml = Get-Content .\pom.xml
|
|
|
|
# version
|
|
|
|
Write-Host $pomXml.project.version
|
|
|
|
$version=$pomXml.project.version
|
|
|
|
Write-Host "##vso[task.setvariable variable=version]$version"
|
|
|
|
|
|
|
|
- task: Maven@3
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
|
|
|
mavenOptions: '-Xmx3072m'
|
|
|
|
javaHomeOption: 'JDKVersion'
|
|
|
|
jdkVersionOption: '1.8'
|
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
publishJUnitResults: true
|
|
|
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
2020-05-04 12:44:46 -04:00
|
|
|
goals: 'clean package'
|
2020-05-02 10:00:03 -04:00
|
|
|
|
2020-05-04 11:59:23 -04:00
|
|
|
- bash: echo Current version => $(version)
|
2020-05-04 20:24:06 -04:00
|
|
|
displayName: 'version'
|
2020-05-02 10:00:03 -04:00
|
|
|
|
2020-05-05 11:36:14 -04:00
|
|
|
# - script: bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN)
|
|
|
|
# displayName: 'codecov'
|
2020-05-04 20:24:06 -04:00
|
|
|
|
2020-05-05 11:44:57 -04:00
|
|
|
- task: PublishCodeCoverageResults@1
|
|
|
|
inputs:
|
|
|
|
codeCoverageTool: "Jacoco"
|
|
|
|
summaryFileLocation: "$(System.DefaultWorkingDirectory)/report/target/site/jacoco-aggregate/jacoco.xml"
|
|
|
|
failIfCoverageEmpty: true
|
2020-05-02 10:00:03 -04:00
|
|
|
|
2020-05-04 11:59:23 -04:00
|
|
|
# - task: PublishPipelineArtifact@1
|
|
|
|
# condition: eq(variables.currentImage, 'ubuntu-16.04')
|
|
|
|
# inputs:
|
|
|
|
# targetPath: "$(System.DefaultWorkingDirectory)/target/ProjectA-$(version).jar"
|
|
|
|
# artifactName: ProjectAOutput
|
2020-05-02 10:00:03 -04:00
|
|
|
|
|
|
|
|