com.salesforce.dockerfileimageupdate.utils.ResultsProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dockerfile-image-update Show documentation
Show all versions of dockerfile-image-update Show documentation
This tool provides a mechanism to make security updates to docker images at scale.
The tool searches github for declared docker images and sends pull requests to projects that are not using
the desired version of the requested docker image.
package com.salesforce.dockerfileimageupdate.utils;
import org.slf4j.Logger;
import java.io.IOException;
import java.util.List;
/**
* Processes results of a rur
*/
public class ResultsProcessor {
public static final String REPOS_SKIPPED_MESSAGE = "List of repos skipped: {}";
/**
* Process the results of a run and output for the user
*
* @param skippedRepos repos that were skipped during processing
* @param exceptions exceptions that occurred during processing
* @param logger logger of the caller
* @throws IOException throws if there are exceptions
*/
public static void processResults(List skippedRepos, List exceptions, Logger logger) throws IOException {
if (!skippedRepos.isEmpty()) {
logger.info(REPOS_SKIPPED_MESSAGE, skippedRepos);
}
if (!exceptions.isEmpty()) {
throw new IOException(String.format("There were %s errors with changing Dockerfiles.", exceptions.size()));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy