All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.salesforce.dockerfileimageupdate.utils.ResultsProcessor Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.1.26
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy