Skip to content

Commit

Permalink
Allow overriding mvn commands
Browse files Browse the repository at this point in the history
This patch allows the  to over maven
command in order to allow inetgration tests to pass specific
maven flags.

Related to: fabric8io#412
  • Loading branch information
hrishin committed Aug 10, 2018
1 parent 92fc97e commit 51a00a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vars/mavenIntegrationTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
}
}

0 comments on commit 51a00a3

Please sign in to comment.