-
Notifications
You must be signed in to change notification settings - Fork 161
/
setup-and-cache-job-template.yml
41 lines (41 loc) · 1.45 KB
/
setup-and-cache-job-template.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
jobs:
- job: setup
displayName: Cache Maven Artifacts and Build Targets
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
fetchDepth: 1
- task: Cache@2
displayName: Cache maven artifacts
inputs:
key: maven | $(Build.BuildId) | artifacts
path: $(MAVEN_CACHE_FOLDER)
- template: cache-target-tasks-template.yml
parameters:
modules:
${{ parameters.modulesToCache }}
- task: Bash@3
inputs:
targetType: 'inline'
script: mkdir -p $(MAVEN_CACHE_FOLDER); pwd; ls -al $(MAVEN_CACHE_FOLDER)
- ${{ if eq(parameters.signArtifacts, true) }}:
- template: setup-signing-tasks-template.yml
- task: Maven@4
inputs:
mavenPomFile: 'pom.xml'
${{ if eq(parameters.signArtifacts, true) }}:
options: '--settings $(Agent.TempDirectory)/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -DdeployToSonatype -P CHECKSTYLE'
${{ else }}:
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -P CHECKSTYLE'
mavenOptions: '-Xmx1G'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'install'
- task: Bash@3
displayName: Report free disk space
inputs:
targetType: 'inline'
script: df -H .