12 lines
327 B
Groovy
12 lines
327 B
Groovy
#!/usr/bin/env groovy
|
|
// Build a Maven project inside the maven container of the pod.
|
|
// Usage: mavenBuild() or mavenBuild(goals: 'clean test')
|
|
def call(Map config = [:]) {
|
|
def goals = config.goals ?: 'clean package'
|
|
container('maven') {
|
|
stage('Maven build') {
|
|
sh "mvn ${goals}"
|
|
}
|
|
}
|
|
}
|