Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,6 @@ private static void createAndVerifyMiiDomain() {
// get the pre-built image created by IntegrationTestWatcher
miiImage = MII_BASIC_IMAGE_NAME + ":" + MII_BASIC_IMAGE_TAG;

// docker login and push image to docker registry if necessary
dockerLoginAndPushImageToRegistry(miiImage);

// create docker registry secret to pull the image from registry
// this secret is used only for non-kind cluster
logger.info("Creating docker registry secret in namespace {0}", domainNamespace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ public void close() {
if (DOMAIN_IMAGES_REPO.contains("ocir.io")) {
String token = getOcirToken();
if (token != null) {
logger.info("Deleting these images from OCIR");
logger.info(String.join(", ", pushedImages));
for (String image : pushedImages) {
deleteImageOcir(token, image);
}
Expand All @@ -375,10 +377,14 @@ public void close() {
private String getOcirToken() {
LoggingFacade logger = getLogger();
Path scriptPath = Paths.get(RESOURCE_DIR, "bash-scripts", "ocirtoken.sh");
String cmd = scriptPath.toFile().getAbsolutePath();
StringBuilder cmd = new StringBuilder()
.append(scriptPath.toFile().getAbsolutePath())
.append(" -u " + OCIR_USERNAME)
.append(" -p \"" + OCIR_PASSWORD + "\"")
.append(" -e " + OCIR_REGISTRY);
ExecResult result = null;
try {
result = ExecCommand.exec(cmd, true);
result = ExecCommand.exec(cmd.toString(), true);
} catch (Exception e) {
logger.info("Got exception while running command: {0}", cmd);
logger.info(e.toString());
Expand Down