Skip to content

Commit 9a09050

Browse files
committed
added more comments
1 parent 779861c commit 9a09050

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ private HtmlPage submitConfigureForm(
693693
*/
694694
private static void gitCloneBuildMonitoringExporter() throws Exception {
695695
String monitoringExporterSrcDir = monitoringExporterDir + "/src";
696+
// target dir for monitoring exporter webapp
696697
String monitoringExporterWar =
697698
monitoringExporterDir + "/apps/monitoringexporter/wls-exporter.war";
698699
if (new File(monitoringExporterWar).exists()) {
@@ -701,6 +702,8 @@ private static void gitCloneBuildMonitoringExporter() throws Exception {
701702
if (!new File(monitoringExporterDir).exists()) {
702703
Files.createDirectories(Paths.get(monitoringExporterDir));
703704
}
705+
// make sure to always refresh the code from github, if destination dir is not empty, clean it
706+
// first, clone after
704707
if (!monitoringExporterSrcDir.isEmpty()) {
705708
StringBuffer removeAndClone = new StringBuffer();
706709
logger.info(
@@ -718,13 +721,16 @@ private static void gitCloneBuildMonitoringExporter() throws Exception {
718721
.append(monitoringExporterSrcDir);
719722
TestUtils.exec(removeAndClone.toString());
720723
}
724+
725+
// build monitoring exporter project
721726
StringBuffer buildExporter = new StringBuffer();
722727
buildExporter
723728
.append("cd " + monitoringExporterSrcDir)
724729
.append(" && ")
725730
.append(" mvn clean install --log-file output.txt");
726731
TestUtils.exec(buildExporter.toString());
727732

733+
// build monitoring monitoring exporter webapp
728734
StringBuffer buildExporterWAR = new StringBuffer();
729735
buildExporterWAR
730736
.append("cd " + monitoringExporterSrcDir + "/webapp")
@@ -734,13 +740,15 @@ private static void gitCloneBuildMonitoringExporter() throws Exception {
734740
.append(" --log-file output1.txt");
735741
TestUtils.exec(buildExporterWAR.toString());
736742

743+
// build coordinator image
737744
StringBuffer buildCoordinatorImage = new StringBuffer();
738745
buildCoordinatorImage
739746
.append("cd " + monitoringExporterSrcDir + "/config_coordinator")
740747
.append(" && ")
741748
.append(" docker build -t config_coordinator . ");
742749
TestUtils.exec(buildCoordinatorImage.toString());
743750

751+
// copy created war file to desired destination
744752
buildExporterWAR = new StringBuffer();
745753
buildExporterWAR
746754
.append(" mkdir " + monitoringExporterDir + "/apps")

integration-tests/src/test/resources/exporter/rest_webapp.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
3+
14
query_sync:
25
url: http://coordinator:8999/
36
refreshInterval: 5

0 commit comments

Comments
 (0)