java-spring-microservice/Jenkinsfile
Jim Nicholson c4aa826b0e
Some checks failed
Homelab/java-spring-microservice/pipeline/head There was a failure building this commit
Force pod template label, not container
2021-12-09 23:06:16 -08:00

25 lines
546 B
Groovy

def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, containers: [
containerTemplate(
name: 'maven',
image: 'maven:3.8.4-openjdk-11',
command: 'sleep',
args: '30d'
)
]) {
node(label) {
stage('Checkout') {
// git credentialsId: 'jenkins-credentials', url: 'https://git.thejimnicholson.com/homelab/java-spring-microservice.git'
checkout scm
container('maven') {
stage('Build') {
sh '''
mvn clean package
'''
}
}
}
}
}