Skip to content

Commit 1c043a3

Browse files
committed
remove unwanted images
1 parent 9df87d0 commit 1c043a3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,21 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
197197
logTestBegin(testMethodName);
198198

199199
try {
200+
ExecAndPrintLog("docker images");
201+
String images[] = {
202+
System.getenv("REPO_REGISTRY") + "/weblogick8s/weblogic-kubernetes-operator",
203+
System.getenv("REPO_REGISTRY") + "/weblogick8s/domain-home-in-image",
204+
"domain-home-in-image",
205+
"domain-home-in-image-wdt",
206+
System.getenv("REPO_REGISTRY") + "/weblogick8s/wdt/wls",
207+
"oracle/weblogic-kubernetes-operator",
208+
"store/oracle/weblogic",
209+
System.getenv("REPO_REGISTRY") + "/weblogick8s/store/oracle/weblogic"
210+
};
211+
for (String image : images) {
212+
ExecAndPrintLog("docker rmi `docker images -q " + image + " `");
213+
}
214+
ExecAndPrintLog("docker rmi $(docker images -f \"dangling=true\" -q)");
200215
ExecAndPrintLog("docker images");
201216
logger.info(
202217
"About to verifyDomainServerPodRestart for Domain: "
@@ -232,6 +247,17 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
232247
233248
// domain.getDomainNS());
234249

250+
ExecAndPrintLog(
251+
"kubectl create secret docker-registry docker-store "
252+
+ "--docker-server="
253+
+ System.getenv("REPO_REGISTRY")
254+
+ " --docker-username="
255+
+ System.getenv("REPO_USERNAME")
256+
+ " --docker-password="
257+
+ System.getenv("REPO_PASSWORD")
258+
+ " -n "
259+
+ domain.getDomainNS()
260+
+ " --dry-run -o yaml");
235261
String command =
236262
"kubectl create secret docker-registry docker-store "
237263
+ "--docker-server="

0 commit comments

Comments
 (0)