cicd-java-spring-boot/Jenkinsfile
2023-02-01 07:11:40 +00:00

28 lines
511 B
Groovy

podTemplate(
containers: [
containerTemplate(
name: 'gradle',
image: 'gradle:4.5.1-jdk9',
command: 'cat',
ttyEnabled: true
)
],
volumes: [
hostPathVolume(
mountPath: '/home/gradle/.gradle',
hostPath: '/tmp/jenkins/.gradle'
),
]
)
{
node(POD_LABEL) {
stage('Build') {
container('gradle') {
sh "gradle build"
}
}
}
}
}