Search in sources :

Example 31 with InvalidImageReferenceException

use of com.google.cloud.tools.jib.api.InvalidImageReferenceException in project jib by GoogleContainerTools.

the class BuildImageMojoIntegrationTest method buildAndRun.

/**
 * Builds with {@code jib:build} on a project at {@code projectRoot} pushing to {@code
 * imageReference} and run the image after pulling it.
 */
private static String buildAndRun(Path projectRoot, String imageReference, String pomXml, boolean buildTwice) throws VerificationException, IOException, InterruptedException, DigestException {
    build(projectRoot, imageReference, pomXml, buildTwice).verifyErrorFreeLog();
    String output = pullAndRunBuiltImage(imageReference);
    try {
        // Test pulling/running using image digest
        String digest = readDigestFile(projectRoot.resolve("target/jib-image.digest"));
        String imageReferenceWithDigest = ImageReference.parse(imageReference).withQualifier(digest).toString();
        assertThat(pullAndRunBuiltImage(imageReferenceWithDigest)).isEqualTo(output);
        // Test running using image id
        String id = readDigestFile(projectRoot.resolve("target/jib-image.id"));
        assertThat(id).isNotEqualTo(digest);
        assertThat(new Command("docker", "run", "--rm", id).run()).isEqualTo(output);
    } catch (InvalidImageReferenceException ex) {
        throw new AssertionError("error replacing tag with digest", ex);
    }
    return output;
}
Also used : Command(com.google.cloud.tools.jib.Command) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException)

Example 32 with InvalidImageReferenceException

use of com.google.cloud.tools.jib.api.InvalidImageReferenceException in project jib by GoogleContainerTools.

the class BuildImageMojo method execute.

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    checkJibVersion();
    if (MojoCommon.shouldSkipJibExecution(this)) {
        return;
    }
    // Validates 'format'.
    if (Arrays.stream(ImageFormat.values()).noneMatch(value -> value.name().equals(getFormat()))) {
        throw new MojoFailureException("<format> parameter is configured with value '" + getFormat() + "', but the only valid configuration options are '" + ImageFormat.Docker + "' and '" + ImageFormat.OCI + "'.");
    }
    // Parses 'to' into image reference.
    if (Strings.isNullOrEmpty(getTargetImage())) {
        throw new MojoFailureException(HelpfulSuggestions.forToNotConfigured("Missing target image parameter", "<to><image>", "pom.xml", "mvn compile jib:build -Dimage=<your image name>"));
    }
    MavenSettingsProxyProvider.activateHttpAndHttpsProxies(getSession().getSettings(), getSettingsDecrypter());
    TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider();
    MavenProjectProperties projectProperties = MavenProjectProperties.getForProject(Preconditions.checkNotNull(descriptor), getProject(), getSession(), getLog(), tempDirectoryProvider, getInjectedPluginExtensions());
    Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.empty());
    try {
        GlobalConfig globalConfig = GlobalConfig.readConfig();
        updateCheckFuture = MojoCommon.newUpdateChecker(projectProperties, globalConfig, getLog());
        PluginConfigurationProcessor.createJibBuildRunnerForRegistryImage(new MavenRawConfiguration(this), new MavenSettingsServerCredentials(getSession().getSettings(), getSettingsDecrypter()), projectProperties, globalConfig, new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX)).runBuild();
    } catch (InvalidAppRootException ex) {
        throw new MojoExecutionException("<container><appRoot> is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidContainerizingModeException ex) {
        throw new MojoExecutionException("invalid value for <containerizingMode>: " + ex.getInvalidContainerizingMode(), ex);
    } catch (InvalidWorkingDirectoryException ex) {
        throw new MojoExecutionException("<container><workingDirectory> is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidPlatformException ex) {
        throw new MojoExecutionException("<from><platforms> contains a platform configuration that is missing required values or has invalid values: " + ex.getMessage() + ": " + ex.getInvalidPlatform(), ex);
    } catch (InvalidContainerVolumeException ex) {
        throw new MojoExecutionException("<container><volumes> is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
    } catch (InvalidFilesModificationTimeException ex) {
        throw new MojoExecutionException("<container><filesModificationTime> should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": " + ex.getInvalidFilesModificationTime(), ex);
    } catch (InvalidCreationTimeException ex) {
        throw new MojoExecutionException("<container><creationTime> should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", " + "\"USE_CURRENT_TIMESTAMP\"): " + ex.getInvalidCreationTime(), ex);
    } catch (JibPluginExtensionException ex) {
        String extensionName = ex.getExtensionClass().getName();
        throw new MojoExecutionException("error running extension '" + extensionName + "': " + ex.getMessage(), ex);
    } catch (IncompatibleBaseImageJavaVersionException ex) {
        throw new MojoExecutionException(HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()), ex);
    } catch (InvalidImageReferenceException ex) {
        throw new MojoExecutionException(HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
    } catch (IOException | CacheDirectoryCreationException | MainClassInferenceException | InvalidGlobalConfigException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex);
    } catch (BuildStepsExecutionException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex.getCause());
    } catch (ExtraDirectoryNotFoundException ex) {
        throw new MojoExecutionException("<extraDirectories><paths> contain \"from\" directory that doesn't exist locally: " + ex.getPath(), ex);
    } finally {
        tempDirectoryProvider.close();
        MojoCommon.finishUpdateChecker(projectProperties, updateCheckFuture);
        projectProperties.waitForLoggingThread();
        getLog().info("");
    }
}
Also used : InvalidContainerVolumeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerVolumeException) GlobalConfig(com.google.cloud.tools.jib.plugins.common.globalconfig.GlobalConfig) ExtraDirectoryNotFoundException(com.google.cloud.tools.jib.plugins.common.ExtraDirectoryNotFoundException) InvalidFilesModificationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidFilesModificationTimeException) IncompatibleBaseImageJavaVersionException(com.google.cloud.tools.jib.plugins.common.IncompatibleBaseImageJavaVersionException) InvalidWorkingDirectoryException(com.google.cloud.tools.jib.plugins.common.InvalidWorkingDirectoryException) TempDirectoryProvider(com.google.cloud.tools.jib.filesystem.TempDirectoryProvider) InvalidContainerizingModeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerizingModeException) InvalidPlatformException(com.google.cloud.tools.jib.plugins.common.InvalidPlatformException) InvalidAppRootException(com.google.cloud.tools.jib.plugins.common.InvalidAppRootException) Optional(java.util.Optional) MojoExecutionException(org.apache.maven.plugin.MojoExecutionException) MojoFailureException(org.apache.maven.plugin.MojoFailureException) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) BuildStepsExecutionException(com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException) IOException(java.io.IOException) InvalidGlobalConfigException(com.google.cloud.tools.jib.plugins.common.globalconfig.InvalidGlobalConfigException) CacheDirectoryCreationException(com.google.cloud.tools.jib.api.CacheDirectoryCreationException) JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) InvalidCreationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidCreationTimeException) MainClassInferenceException(com.google.cloud.tools.jib.plugins.common.MainClassInferenceException)

Example 33 with InvalidImageReferenceException

use of com.google.cloud.tools.jib.api.InvalidImageReferenceException in project jib by GoogleContainerTools.

the class ContainerBuilders method create.

/**
 * Creates a {@link JibContainerBuilder} depending on the base image specified.
 *
 * @param baseImageReference base image reference
 * @param platforms platforms for multi-platform support in build command
 * @param commonCliOptions common cli options
 * @param logger console logger
 * @return a {@link JibContainerBuilder}
 * @throws InvalidImageReferenceException if the baseImage reference cannot be parsed
 * @throws FileNotFoundException if credential helper file cannot be found
 */
public static JibContainerBuilder create(String baseImageReference, Set<Platform> platforms, CommonCliOptions commonCliOptions, ConsoleLogger logger) throws InvalidImageReferenceException, FileNotFoundException {
    if (baseImageReference.startsWith(DOCKER_DAEMON_IMAGE_PREFIX)) {
        return Jib.from(DockerDaemonImage.named(baseImageReference.replaceFirst(DOCKER_DAEMON_IMAGE_PREFIX, "")));
    }
    if (baseImageReference.startsWith(TAR_IMAGE_PREFIX)) {
        return Jib.from(TarImage.at(Paths.get(baseImageReference.replaceFirst(TAR_IMAGE_PREFIX, ""))));
    }
    ImageReference imageReference = ImageReference.parse(baseImageReference.replaceFirst(REGISTRY_IMAGE_PREFIX, ""));
    RegistryImage registryImage = RegistryImage.named(imageReference);
    DefaultCredentialRetrievers defaultCredentialRetrievers = DefaultCredentialRetrievers.init(CredentialRetrieverFactory.forImage(imageReference, logEvent -> logger.log(logEvent.getLevel(), logEvent.getMessage())));
    Credentials.getFromCredentialRetrievers(commonCliOptions, defaultCredentialRetrievers).forEach(registryImage::addCredentialRetriever);
    JibContainerBuilder containerBuilder = Jib.from(registryImage);
    if (!platforms.isEmpty()) {
        containerBuilder.setPlatforms(platforms);
    }
    return containerBuilder;
}
Also used : DockerDaemonImage(com.google.cloud.tools.jib.api.DockerDaemonImage) ImageReference(com.google.cloud.tools.jib.api.ImageReference) JibContainerBuilder(com.google.cloud.tools.jib.api.JibContainerBuilder) TAR_IMAGE_PREFIX(com.google.cloud.tools.jib.api.Jib.TAR_IMAGE_PREFIX) RegistryImage(com.google.cloud.tools.jib.api.RegistryImage) Set(java.util.Set) TarImage(com.google.cloud.tools.jib.api.TarImage) DefaultCredentialRetrievers(com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers) DOCKER_DAEMON_IMAGE_PREFIX(com.google.cloud.tools.jib.api.Jib.DOCKER_DAEMON_IMAGE_PREFIX) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) FileNotFoundException(java.io.FileNotFoundException) REGISTRY_IMAGE_PREFIX(com.google.cloud.tools.jib.api.Jib.REGISTRY_IMAGE_PREFIX) Jib(com.google.cloud.tools.jib.api.Jib) Paths(java.nio.file.Paths) Platform(com.google.cloud.tools.jib.api.buildplan.Platform) CredentialRetrieverFactory(com.google.cloud.tools.jib.frontend.CredentialRetrieverFactory) ConsoleLogger(com.google.cloud.tools.jib.plugins.common.logging.ConsoleLogger) ImageReference(com.google.cloud.tools.jib.api.ImageReference) JibContainerBuilder(com.google.cloud.tools.jib.api.JibContainerBuilder) DefaultCredentialRetrievers(com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers) RegistryImage(com.google.cloud.tools.jib.api.RegistryImage)

Example 34 with InvalidImageReferenceException

use of com.google.cloud.tools.jib.api.InvalidImageReferenceException in project jib by GoogleContainerTools.

the class PluginConfigurationProcessorTest method testPluginConfigurationProcessor_defaults.

@Test
public void testPluginConfigurationProcessor_defaults() throws InvalidImageReferenceException, IOException, MainClassInferenceException, InvalidAppRootException, InvalidWorkingDirectoryException, InvalidPlatformException, InvalidContainerVolumeException, IncompatibleBaseImageJavaVersionException, NumberFormatException, InvalidContainerizingModeException, InvalidFilesModificationTimeException, InvalidCreationTimeException, ExtraDirectoryNotFoundException {
    ContainerBuildPlan buildPlan = processCommonConfiguration();
    assertThat(buildPlan.getEntrypoint()).containsExactly("java", "-cp", "/app/resources:/app/classes:/app/libs/*", "java.lang.Object").inOrder();
    verify(containerizer).setBaseImageLayersCache(Containerizer.DEFAULT_BASE_CACHE_DIRECTORY);
    verify(containerizer).setApplicationLayersCache(appCacheDirectory);
    ArgumentMatcher<LogEvent> isLogWarn = logEvent -> logEvent.getLevel() == LogEvent.Level.WARN;
    verify(logger, never()).accept(argThat(isLogWarn));
}
Also used : CredHelperConfiguration(com.google.cloud.tools.jib.plugins.common.RawConfiguration.CredHelperConfiguration) Arrays(java.util.Arrays) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) URISyntaxException(java.net.URISyntaxException) FileTime(java.nio.file.attribute.FileTime) PlatformConfiguration(com.google.cloud.tools.jib.plugins.common.RawConfiguration.PlatformConfiguration) JavaContainerBuilder(com.google.cloud.tools.jib.api.JavaContainerBuilder) ExtraDirectoriesConfiguration(com.google.cloud.tools.jib.plugins.common.RawConfiguration.ExtraDirectoriesConfiguration) Mockito.verifyNoInteractions(org.mockito.Mockito.verifyNoInteractions) ArgumentMatcher(org.mockito.ArgumentMatcher) JUnitParamsRunner(junitparams.JUnitParamsRunner) Path(java.nio.file.Path) AbsoluteUnixPath(com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) JibContainerBuilderTestHelper(com.google.cloud.tools.jib.api.JibContainerBuilderTestHelper) FilePermissions(com.google.cloud.tools.jib.api.buildplan.FilePermissions) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) Instant(java.time.Instant) StandardCharsets(java.nio.charset.StandardCharsets) List(java.util.List) FileEntry(com.google.cloud.tools.jib.api.buildplan.FileEntry) Optional(java.util.Optional) ContainerBuildPlan(com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan) Platform(com.google.cloud.tools.jib.api.buildplan.Platform) Parameters(junitparams.Parameters) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) JibContainerBuilder(com.google.cloud.tools.jib.api.JibContainerBuilder) ImageConfiguration(com.google.cloud.tools.jib.configuration.ImageConfiguration) Mock(org.mockito.Mock) Assert.assertThrows(org.junit.Assert.assertThrows) RegistryImage(com.google.cloud.tools.jib.api.RegistryImage) RunWith(org.junit.runner.RunWith) FileEntriesLayer(com.google.cloud.tools.jib.api.buildplan.FileEntriesLayer) Jib(com.google.cloud.tools.jib.api.Jib) CacheDirectoryCreationException(com.google.cloud.tools.jib.api.CacheDirectoryCreationException) ImmutableList(com.google.common.collect.ImmutableList) MockitoJUnit(org.mockito.junit.MockitoJUnit) Truth8.assertThat(com.google.common.truth.Truth8.assertThat) Nullable(javax.annotation.Nullable) Before(org.junit.Before) Answers(org.mockito.Answers) Resources(com.google.common.io.Resources) Files(java.nio.file.Files) IOException(java.io.IOException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) Truth.assertThat(com.google.common.truth.Truth.assertThat) ModificationTimeProvider(com.google.cloud.tools.jib.api.buildplan.ModificationTimeProvider) File(java.io.File) Mockito.verify(org.mockito.Mockito.verify) Correspondence(com.google.common.truth.Correspondence) Consumer(java.util.function.Consumer) LogEvent(com.google.cloud.tools.jib.api.LogEvent) Mockito(org.mockito.Mockito) Mockito.never(org.mockito.Mockito.never) Rule(org.junit.Rule) Containerizer(com.google.cloud.tools.jib.api.Containerizer) Paths(java.nio.file.Paths) DateTimeFormatter(java.time.format.DateTimeFormatter) RestoreSystemProperties(org.junit.contrib.java.lang.system.RestoreSystemProperties) MockitoRule(org.mockito.junit.MockitoRule) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) LogEvent(com.google.cloud.tools.jib.api.LogEvent) ContainerBuildPlan(com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan) Test(org.junit.Test)

Example 35 with InvalidImageReferenceException

use of com.google.cloud.tools.jib.api.InvalidImageReferenceException in project jib by GoogleContainerTools.

the class PluginConfigurationProcessorTest method testPluginConfigurationProcessor_extraDirectory.

@Test
public void testPluginConfigurationProcessor_extraDirectory() throws URISyntaxException, InvalidContainerVolumeException, MainClassInferenceException, InvalidAppRootException, IOException, IncompatibleBaseImageJavaVersionException, InvalidWorkingDirectoryException, InvalidPlatformException, InvalidImageReferenceException, NumberFormatException, InvalidContainerizingModeException, InvalidFilesModificationTimeException, InvalidCreationTimeException, ExtraDirectoryNotFoundException {
    Path extraDirectory = Paths.get(Resources.getResource("core/layer").toURI());
    Mockito.<List<?>>when(rawConfiguration.getExtraDirectories()).thenReturn(Arrays.asList(new TestExtraDirectoriesConfiguration(extraDirectory)));
    when(rawConfiguration.getExtraDirectoryPermissions()).thenReturn(ImmutableMap.of("/target/dir/foo", FilePermissions.fromOctalString("123")));
    ContainerBuildPlan buildPlan = processCommonConfiguration();
    List<FileEntry> extraFiles = getLayerEntries(buildPlan, "extra files");
    assertThat(extraFiles).comparingElementsUsing(SOURCE_FILE_OF).containsExactly(extraDirectory.resolve("a"), extraDirectory.resolve("a/b"), extraDirectory.resolve("a/b/bar"), extraDirectory.resolve("c"), extraDirectory.resolve("c/cat"), extraDirectory.resolve("foo"));
    assertThat(extraFiles).comparingElementsUsing(EXTRACTION_PATH_OF).containsExactly("/target/dir/a", "/target/dir/a/b", "/target/dir/a/b/bar", "/target/dir/c", "/target/dir/c/cat", "/target/dir/foo");
    Optional<FileEntry> fooEntry = extraFiles.stream().filter(layerEntry -> layerEntry.getExtractionPath().equals(AbsoluteUnixPath.get("/target/dir/foo"))).findFirst();
    assertThat(fooEntry).isPresent();
    assertThat(fooEntry.get().getPermissions().toOctalString()).isEqualTo("123");
}
Also used : Path(java.nio.file.Path) AbsoluteUnixPath(com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath) CredHelperConfiguration(com.google.cloud.tools.jib.plugins.common.RawConfiguration.CredHelperConfiguration) Arrays(java.util.Arrays) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) URISyntaxException(java.net.URISyntaxException) FileTime(java.nio.file.attribute.FileTime) PlatformConfiguration(com.google.cloud.tools.jib.plugins.common.RawConfiguration.PlatformConfiguration) JavaContainerBuilder(com.google.cloud.tools.jib.api.JavaContainerBuilder) ExtraDirectoriesConfiguration(com.google.cloud.tools.jib.plugins.common.RawConfiguration.ExtraDirectoriesConfiguration) Mockito.verifyNoInteractions(org.mockito.Mockito.verifyNoInteractions) ArgumentMatcher(org.mockito.ArgumentMatcher) JUnitParamsRunner(junitparams.JUnitParamsRunner) Path(java.nio.file.Path) AbsoluteUnixPath(com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) JibContainerBuilderTestHelper(com.google.cloud.tools.jib.api.JibContainerBuilderTestHelper) FilePermissions(com.google.cloud.tools.jib.api.buildplan.FilePermissions) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) Instant(java.time.Instant) StandardCharsets(java.nio.charset.StandardCharsets) List(java.util.List) FileEntry(com.google.cloud.tools.jib.api.buildplan.FileEntry) Optional(java.util.Optional) ContainerBuildPlan(com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan) Platform(com.google.cloud.tools.jib.api.buildplan.Platform) Parameters(junitparams.Parameters) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) JibContainerBuilder(com.google.cloud.tools.jib.api.JibContainerBuilder) ImageConfiguration(com.google.cloud.tools.jib.configuration.ImageConfiguration) Mock(org.mockito.Mock) Assert.assertThrows(org.junit.Assert.assertThrows) RegistryImage(com.google.cloud.tools.jib.api.RegistryImage) RunWith(org.junit.runner.RunWith) FileEntriesLayer(com.google.cloud.tools.jib.api.buildplan.FileEntriesLayer) Jib(com.google.cloud.tools.jib.api.Jib) CacheDirectoryCreationException(com.google.cloud.tools.jib.api.CacheDirectoryCreationException) ImmutableList(com.google.common.collect.ImmutableList) MockitoJUnit(org.mockito.junit.MockitoJUnit) Truth8.assertThat(com.google.common.truth.Truth8.assertThat) Nullable(javax.annotation.Nullable) Before(org.junit.Before) Answers(org.mockito.Answers) Resources(com.google.common.io.Resources) Files(java.nio.file.Files) IOException(java.io.IOException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) Truth.assertThat(com.google.common.truth.Truth.assertThat) ModificationTimeProvider(com.google.cloud.tools.jib.api.buildplan.ModificationTimeProvider) File(java.io.File) Mockito.verify(org.mockito.Mockito.verify) Correspondence(com.google.common.truth.Correspondence) Consumer(java.util.function.Consumer) LogEvent(com.google.cloud.tools.jib.api.LogEvent) Mockito(org.mockito.Mockito) Mockito.never(org.mockito.Mockito.never) Rule(org.junit.Rule) Containerizer(com.google.cloud.tools.jib.api.Containerizer) Paths(java.nio.file.Paths) DateTimeFormatter(java.time.format.DateTimeFormatter) RestoreSystemProperties(org.junit.contrib.java.lang.system.RestoreSystemProperties) MockitoRule(org.mockito.junit.MockitoRule) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) FileEntry(com.google.cloud.tools.jib.api.buildplan.FileEntry) ContainerBuildPlan(com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan) Test(org.junit.Test)

Aggregations

InvalidImageReferenceException (com.google.cloud.tools.jib.api.InvalidImageReferenceException)45 IOException (java.io.IOException)33 CacheDirectoryCreationException (com.google.cloud.tools.jib.api.CacheDirectoryCreationException)25 Optional (java.util.Optional)24 Path (java.nio.file.Path)19 JibContainerBuilder (com.google.cloud.tools.jib.api.JibContainerBuilder)18 JibPluginExtensionException (com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException)18 RegistryImage (com.google.cloud.tools.jib.api.RegistryImage)17 Paths (java.nio.file.Paths)16 List (java.util.List)16 Nullable (javax.annotation.Nullable)16 Containerizer (com.google.cloud.tools.jib.api.Containerizer)15 LogEvent (com.google.cloud.tools.jib.api.LogEvent)15 Jib (com.google.cloud.tools.jib.api.Jib)14 AbsoluteUnixPath (com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath)14 GlobalConfig (com.google.cloud.tools.jib.plugins.common.globalconfig.GlobalConfig)14 FileEntriesLayer (com.google.cloud.tools.jib.api.buildplan.FileEntriesLayer)13 Instant (java.time.Instant)13 ContainerBuildPlan (com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan)12 Platform (com.google.cloud.tools.jib.api.buildplan.Platform)12