public class ArchiveService extends Object
Constructor and Description |
---|
ArchiveService(DockerAssemblyManager dockerAssemblyManager,
org.eclipse.jkube.kit.common.KitLogger log) |
Modifier and Type | Method and Description |
---|---|
File |
createChangedFilesArchive(List<AssemblyFiles.Entry> entries,
File assemblyDir,
String imageName,
JKubeBuildContext mojoParameters)
Create an tar archive from a set of assembly files.
|
File |
createDockerBuildArchive(ImageConfiguration imageConfig,
JKubeBuildContext params)
Create the tar file container the source for building an image.
|
File |
createDockerBuildArchive(ImageConfiguration imageConfig,
JKubeBuildContext params,
ArchiverCustomizer customizer)
Create the tar file container the source for building an image.
|
AssemblyFiles |
getAssemblyFiles(ImageConfiguration imageConfig,
JKubeBuildContext mojoParameters)
Get a mapping of original to destination files which a covered by an assembly.
|
public ArchiveService(DockerAssemblyManager dockerAssemblyManager, org.eclipse.jkube.kit.common.KitLogger log)
public File createDockerBuildArchive(ImageConfiguration imageConfig, JKubeBuildContext params) throws IOException
imageConfig
- the image configurationparams
- mojo params for the projectIOException
- if during creation of the tar an error occurs.public File createDockerBuildArchive(ImageConfiguration imageConfig, JKubeBuildContext params, ArchiverCustomizer customizer) throws IOException
imageConfig
- the image configurationparams
- mojo params for the projectcustomizer
- final customizer to be applied to the tar before being generatedIOException
- if during creation of the tar an error occurs.public AssemblyFiles getAssemblyFiles(ImageConfiguration imageConfig, JKubeBuildContext mojoParameters) throws IOException
imageConfig
- image config for which to get files. The build- and assembly configuration in this image
config must not be null.mojoParameters
- needed for tracking the assemblyIOException
- IO Exceptionpublic File createChangedFilesArchive(List<AssemblyFiles.Entry> entries, File assemblyDir, String imageName, JKubeBuildContext mojoParameters) throws IOException
entries
- changed files. List must not be empty or nullassemblyDir
- assembly directoryimageName
- image's namemojoParameters
- maven build contextIOException
- in case of any I/O exceptionCopyright © 2020. All rights reserved.