Add vars/mavenBuild.groovy
This commit is contained in:
1 parent
a23bcef908
commit
68ad0060e1
1 file changed
+11
@@ -0,0 +1,11 @@
|
||||
#!/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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user