public void pushImages ( Collection < ImageConfiguration > imageConfigs , int retries , RegistryConfig registryConfig , boolean skipTag ) throws DockerAccessException , MojoExecutionException { for ( ImageConfiguration imageConfig : imageConfigs ) { BuildImageConfiguration buildConfig = imageConfig . getBuildConfiguration ( ) ; String name = imageConfig . getName ( ) ; if ( buildConfig != null ) { String configuredRegistry = EnvUtil . firstRegistryOf ( new ImageName ( imageConfig . getName ( ) ) . getRegistry ( ) , imageConfig . getRegistry ( ) , registryConfig . getRegistry ( ) ) ; AuthConfig authConfig = createAuthConfig ( true , new ImageName ( name ) . getUser ( ) , configuredRegistry , registryConfig ) ; long start = System . currentTimeMillis ( ) ; docker . pushImage ( name , authConfig , configuredRegistry , retries ) ; log . info ( "Pushed %s in %s" , name , EnvUtil . formatDurationTill ( start ) ) ; if ( ! skipTag ) { for ( String tag : imageConfig . getBuildConfiguration ( ) . getTags ( ) ) { if ( tag != null ) { docker . pushImage ( new ImageName ( name , tag ) . getFullName ( ) , authConfig , configuredRegistry , retries ) ; } } } } } }
Push a set of images to a registry