diff --git a/vars/mavenIntegrationTest.groovy b/vars/mavenIntegrationTest.groovy index 330722ab..2507e123 100644 --- a/vars/mavenIntegrationTest.groovy +++ b/vars/mavenIntegrationTest.groovy @@ -11,6 +11,8 @@ def call(body) { def utils = new Utils() def envName = config.environment def kubeNS = "-Dfabric8.environment=${envName}" + 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" + if (envName) { // lets try find the actual kubernetes namespace try { @@ -29,8 +31,7 @@ def call(body) { echo "WARNING: Integration tests are current DISABLED for these pipelines!" } else { - 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" - + sh cmd junitResults(body); } }