Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -664,16 +664,20 @@ public static boolean isDeploymentReady(String deploymentName,
boolean status = false;
V1Deployment deployment = getDeployment(deploymentName, label, namespace);

V1DeploymentCondition v1DeploymentRunningCondition = Optional.ofNullable(deployment)
List<V1DeploymentCondition> deplList = Optional.ofNullable(deployment)
.map(V1Deployment::getStatus).map(V1DeploymentStatus::getConditions)
.orElse(null).stream()
.filter(v1DeploymentCondition -> "Available".equals(v1DeploymentCondition.getType()))
.findAny()
.orElse(null);
if (v1DeploymentRunningCondition != null) {
status = v1DeploymentRunningCondition.getStatus().equalsIgnoreCase("true");
} else {
getLogger().info("Can't check deployment status");
if (deplList != null) {
V1DeploymentCondition v1DeploymentRunningCondition = deplList.stream()
.filter(v1DeploymentCondition -> "Available".equals(v1DeploymentCondition.getType()))
.findAny()
.orElse(null);

if (v1DeploymentRunningCondition != null) {
status = v1DeploymentRunningCondition.getStatus().equalsIgnoreCase("true");
} else {
getLogger().info("Can't check deployment status");
}
}
return status;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,28 @@ public static void downloadMonitoringExporterApp(String configFile, String appli
.command(command))
.execute(), "Failed to download monitoring exporter webapp");

command = String.format("cd %s && %s %s",
String command1 = String.format("cd %s && %s %s",
applicationDir,
monitoringExporterBuildFile,
configFile);
assertTrue(new Command()
.withParams(new CommandParams()
.command(command))
.execute(), "Failed to build monitoring exporter webapp");

testUntil(
(() -> new Command()
.withParams(
new CommandParams()
.verbose(true)
.command(command1))
.executeAndVerify("adding: config.yml")
),
logger,
"Downloading monitoring exporter webapp");

assertDoesNotThrow(() -> checkFile(applicationDir + "/wls-exporter.war"),
"Monitoring Exporter web application file was not found");
}

/**
* Build monitoring exporter web applicaiont wls-exporter.war with provided configuration
* Build monitoring exporter web applicaiont wls-exporter.war with provided configuration
* @param monitoringExporterSrcDir directory containing github monitoring exporter
* @param configFile configuration file for weblogic domain monitoring
* @param appDir directory where war file will be created
Expand Down