Skip to content

Commit ad5c633

Browse files
committed
cleanup for manual runs
1 parent 43b8f99 commit ad5c633

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ITFirstDomain.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ public static void staticPrepare() throws Exception {
5656
initialize(appPropsFile);
5757

5858
// delete k8s artifacts created if any, delete PV directories
59-
ExecResult result = cleanup();
60-
if (result.exitValue() != 0) {
61-
throw new RuntimeException(
62-
"FAILED: Command to call cleanup script failed " + result.stderr());
59+
if (System.getenv("WERCKER") == null && System.getenv("JENKINS") == null) {
60+
ExecResult result = cleanup();
61+
if (result.exitValue() != 0) {
62+
throw new RuntimeException(
63+
"FAILED: Command to call cleanup script failed " + result.stderr());
64+
}
65+
logger.info(
66+
"Command to call cleanup script returned " + result.stdout() + "\n" + result.stderr());
6367
}
64-
logger.info(
65-
"Command to call cleanup script returned " + result.stdout() + "\n" + result.stderr());
6668

6769
// renew lease at the begining for every test method, leaseId is set only for Wercker
6870
TestUtils.renewK8sClusterLease(getProjectRoot(), getLeaseId());

0 commit comments

Comments
 (0)