cicd-java-spring-boot/Jenkinsfile

28 lines
506 B
Plaintext
Raw Normal View History

2023-02-01 07:11:40 +00:00
podTemplate(
containers: [
containerTemplate(
name: 'gradle',
2023-02-01 07:13:32 +00:00
image: 'gradle:jdk11',
2023-02-01 07:11:40 +00:00
command: 'cat',
ttyEnabled: true
)
],
volumes: [
hostPathVolume(
mountPath: '/home/gradle/.gradle',
hostPath: '/tmp/jenkins/.gradle'
),
]
)
2023-01-31 13:42:28 +00:00
2023-02-01 07:11:40 +00:00
{
node(POD_LABEL) {
stage('Build') {
container('gradle') {
sh "gradle build"
2023-01-31 13:42:28 +00:00
}
}
}
2023-02-01 07:11:40 +00:00
}
2023-01-31 13:42:28 +00:00
}