Class RegistryService


  • public class RegistryService
    extends Object
    Allows to interact with registries, eg. to push/pull images.
    • Method Detail

      • pushImages

        public void pushImages​(ProjectPaths projectPaths,
                               Collection<ImageConfiguration> imageConfigs,
                               int retries,
                               RegistryService.RegistryConfig registryConfig,
                               boolean skipTag)
                        throws DockerAccessException,
                               org.apache.maven.plugin.MojoExecutionException
        Push a set of images to a registry
        Parameters:
        imageConfigs - images to push (but only if they have a build configuration)
        retries - how often to retry
        registryConfig - a global registry configuration
        skipTag - flag to skip pushing tagged images
        Throws:
        DockerAccessException
        org.apache.maven.plugin.MojoExecutionException
      • pullImageWithPolicy

        public void pullImageWithPolicy​(String image,
                                        ImagePullManager pullManager,
                                        RegistryService.RegistryConfig registryConfig,
                                        BuildImageConfiguration buildImageConfiguration)
                                 throws DockerAccessException,
                                        org.apache.maven.plugin.MojoExecutionException
        Check an image, and, if autoPull is set to true, fetch it. Otherwise if the image is not existent, throw an error
        Parameters:
        image - image which is required to be pulled
        pullManager - image pull manager
        registryConfig - registry configuration
        buildImageConfiguration - image build configuration
        Throws:
        DockerAccessException - in case of error in contacting docker daemon
        org.apache.maven.plugin.MojoExecutionException - in case of any other misc failure