Skip to content

Commit

Permalink
[UPDATE] - enable caching gor maven build
Browse files Browse the repository at this point in the history
  • Loading branch information
aswin-vijayan committed Jul 23, 2024
1 parent 5c52196 commit b775d5c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ pipeline {
command:
- cat
tty: true
volumeMounts:
- name: maven-cache
mountPath: /root/.m2
- name: kaniko
image: gcr.io/kaniko-project/executor:debug
command:
- /busybox/cat
tty: true
volumes:
- name: maven-cache
hostPath:
path: /var/lib/jenkins-cache/maven
type: DirectoryOrCreate
'''
}
}
Expand All @@ -35,7 +43,7 @@ pipeline {
stage('Build with Maven') {
steps {
container('maven') {
sh 'mvn clean install -DskipTests'
sh 'mvn -B -Dmaven.repo.local=/root/.m2/repository clean install -DskipTests'
}
}
}
Expand Down

0 comments on commit b775d5c

Please sign in to comment.