Add vars/mavenBuild.groovy

This commit is contained in:
khaled committed 2026-09-30 14:10:00 +00:00
1 parent a23bcef908
commit 68ad0060e1
1 file changed
+11
+11
View File
@@ -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}"
}
}
}