public class BuildService extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BuildService.BuildContext |
| Modifier and Type | Method and Description |
|---|---|
File |
buildArchive(ImageConfiguration imageConfiguration,
BuildService.BuildContext buildContext,
String archivePath)
Create docker archive for building image
|
void |
buildImage(ImageConfiguration imageConfig,
ImagePullManager imagePullManager,
BuildService.BuildContext buildContext,
File buildArchiveFile)
Pull the base image if needed and run the build.
|
protected void |
buildImage(ImageConfiguration imageConfig,
MojoParameters params,
boolean noCache,
boolean squash,
Map<String,String> buildArgs,
File dockerArchive)
Build an image
|
void |
copyDockerArchive(ImageConfiguration imageConfiguration,
File dockerArchive,
String archivePath) |
void |
tagImage(ImageConfiguration imageConfig) |
void |
tagImage(String imageName,
String tag,
String repo) |
public void buildImage(ImageConfiguration imageConfig, ImagePullManager imagePullManager, BuildService.BuildContext buildContext, File buildArchiveFile) throws DockerAccessException, org.apache.maven.plugin.MojoExecutionException
imageConfig - the image configurationbuildContext - the build contextDockerAccessExceptionorg.apache.maven.plugin.MojoExecutionExceptionpublic File buildArchive(ImageConfiguration imageConfiguration, BuildService.BuildContext buildContext, String archivePath) throws org.apache.maven.plugin.MojoExecutionException
imageConfiguration - image configurationbuildContext - docker build contextarchivePath - build archive only flag, it can have values TRUE or FALSE and also
it can hold path to archive where it might get copied overorg.apache.maven.plugin.MojoExecutionException - in case any exception comes during building tarballpublic void copyDockerArchive(ImageConfiguration imageConfiguration, File dockerArchive, String archivePath) throws IOException
IOExceptionpublic void tagImage(ImageConfiguration imageConfig) throws DockerAccessException
DockerAccessExceptionprotected void buildImage(ImageConfiguration imageConfig, MojoParameters params, boolean noCache, boolean squash, Map<String,String> buildArgs, File dockerArchive) throws DockerAccessException, org.apache.maven.plugin.MojoExecutionException
imageConfig - the image configurationparams - mojo params for the projectnoCache - if not null, dictate the caching behaviour. Otherwise its taken from the build configurationbuildArgs - docker build argsDockerAccessExceptionorg.apache.maven.plugin.MojoExecutionExceptionpublic void tagImage(String imageName, String tag, String repo) throws DockerAccessException
DockerAccessExceptionCopyright © 2020. All rights reserved.