diff --git a/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/All.java b/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/All.java index c7f6012c..24eb1a59 100644 --- a/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/All.java +++ b/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/All.java @@ -72,13 +72,13 @@ public void execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGit changeDockerfiles(ns, pathToDockerfilesInParentRepo, imagesFoundInParentRepo, imageToTagMap, currUserRepo, skippedRepos); } catch (IOException e) { + log.error(String.format("Error changing Dockerfile for %s", currUserRepo.getName()), e); exceptions.add(e); } } if (!exceptions.isEmpty()) { - log.info("There were {} errors with changing Dockerfiles.", exceptions.size()); - throw exceptions.get(0); + throw new IOException(String.format("There were %s errors with changing Dockerfiles.", exceptions.size())); } if (!skippedRepos.isEmpty()) { diff --git a/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/Parent.java b/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/Parent.java index 7245d350..a6140241 100644 --- a/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/Parent.java +++ b/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/Parent.java @@ -63,12 +63,12 @@ public void execute(final Namespace ns, DockerfileGitHubUtil dockerfileGitHubUti try { changeDockerfiles(ns, pathToDockerfilesInParentRepo, currUserRepo, skippedRepos); } catch (IOException e) { + log.error(String.format("Error changing Dockerfile for %s", currUserRepo.getName()), e); exceptions.add(e); } } if (!exceptions.isEmpty()) { - log.info("There were {} errors with changing Dockerfiles.", exceptions.size()); - throw exceptions.get(0); + throw new IOException(String.format("There were %s errors with changing Dockerfiles.", exceptions.size())); } if (!skippedRepos.isEmpty()) { @@ -142,7 +142,7 @@ protected Multimap forkRepositoriesFoundAndGetPathToDockerfiles( } } - log.info("Path to Dockerfiles in repo '{}': {}", parentRepoName, pathToDockerfilesInParentRepo); + log.info("Path to Dockerfiles in repos: {}", pathToDockerfilesInParentRepo); return pathToDockerfilesInParentRepo; } diff --git a/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/utils/GitHubUtil.java b/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/utils/GitHubUtil.java index 469c2b3b..d6d83957 100644 --- a/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/utils/GitHubUtil.java +++ b/dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/utils/GitHubUtil.java @@ -167,7 +167,7 @@ public PagedIterable getGHRepositories(Multimap pa boolean listOfReposHasRecentForks = true; for (String s : pathToDockerfileInParentRepo.keySet()) { String forkName = s.substring(s.lastIndexOf('/') + 1); - log.info(forkName); + log.info(String.format("Verifying that %s has been forked", forkName)); if (!repoNamesSet.contains(forkName)) { log.debug("Forking is still in progress for {}" , forkName); listOfReposHasRecentForks = false;