java-spring-microservice/Jenkinsfile
Jim Nicholson f42c332757
All checks were successful
Homelab/java-spring-microservice/pipeline/head This commit looks good
Don't skip tests
2021-12-21 22:42:29 -08:00

27 lines
532 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') {
checkout scm
container('maven') {
stage('Build') {
sh '''
mvn clean package
'''
}
stage('Archive') {
archiveArtifacts artifacts: 'target/*.jar', followSymlinks: false
}
}
}
}
}