Skip to content

Commit 5351d6f

Browse files
committed
mavenIntegrationTest: allow overriding mvn commands
This patch allows the to over maven command in order to allow integration tests to pass specific maven flags. Related to: fabric8io#412
1 parent 92fc97e commit 5351d6f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vars/mavenIntegrationTest.groovy

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def call(body) {
1111
def utils = new Utils()
1212
def envName = config.environment
1313
def kubeNS = "-Dfabric8.environment=${envName}"
14+
def cmd = cmd ?: "mvn org.apache.maven.plugins:maven-failsafe-plugin:integration-test ${kubeNS} -P openshift-it -Dit.test=${config.itestPattern} -DfailIfNoTests=${config.failIfNoTests} org.apache.maven.plugins:maven-failsafe-plugin:verify"
15+
1416
if (envName) {
1517
// lets try find the actual kubernetes namespace
1618
try {
@@ -29,8 +31,7 @@ def call(body) {
2931
echo "WARNING: Integration tests are current DISABLED for these pipelines!"
3032

3133
} else {
32-
sh "mvn org.apache.maven.plugins:maven-failsafe-plugin:integration-test ${kubeNS} -P openshift-it -Dit.test=${config.itestPattern} -DfailIfNoTests=${config.failIfNoTests} org.apache.maven.plugins:maven-failsafe-plugin:verify"
33-
34+
sh cmd
3435
junitResults(body);
3536
}
3637
}

0 commit comments

Comments
 (0)