28 lines
511 B
Groovy
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |