Search in sources :

Example 1 with ContainerImageInfoBuildItem

use of io.quarkus.container.spi.ContainerImageInfoBuildItem in project quarkus by quarkusio.

the class S2iProcessor method s2iBuildFromNative.

@BuildStep(onlyIf = { IsNormalNotRemoteDev.class, S2iBuild.class, NativeBuild.class })
public void s2iBuildFromNative(S2iConfig s2iConfig, ContainerImageConfig containerImageConfig, KubernetesClientBuildItem kubernetesClient, ContainerImageInfoBuildItem containerImage, ArchiveRootBuildItem archiveRoot, OutputTargetBuildItem out, PackageConfig packageConfig, List<GeneratedFileSystemResourceBuildItem> generatedResources, Optional<ContainerImageBuildRequestBuildItem> buildRequest, Optional<ContainerImagePushRequestBuildItem> pushRequest, BuildProducer<ArtifactResultBuildItem> artifactResultProducer, BuildProducer<ContainerImageBuilderBuildItem> containerImageBuilder, NativeImageBuildItem nativeImage) {
    if (containerImageConfig.isBuildExplicitlyDisabled()) {
        return;
    }
    if (!containerImageConfig.isBuildExplicitlyEnabled() && !containerImageConfig.isPushExplicitlyEnabled() && !buildRequest.isPresent() && !pushRequest.isPresent()) {
        return;
    }
    String namespace = Optional.ofNullable(kubernetesClient.getClient().getNamespace()).orElse("default");
    LOG.info("Performing s2i binary build with native image on server: " + kubernetesClient.getClient().getMasterUrl() + " in namespace:" + namespace + ".");
    Optional<GeneratedFileSystemResourceBuildItem> openshiftYml = generatedResources.stream().filter(r -> r.getName().endsWith("kubernetes" + File.separator + "openshift.yml")).findFirst();
    if (openshiftYml.isEmpty()) {
        LOG.warn("No Openshift manifests were generated so no s2i process will be taking place");
        return;
    }
    createContainerImage(kubernetesClient, openshiftYml.get(), s2iConfig, out.getOutputDirectory(), nativeImage.getPath());
    artifactResultProducer.produce(new ArtifactResultBuildItem(null, "native-container", Collections.emptyMap()));
    containerImageBuilder.produce(new ContainerImageBuilderBuildItem(S2I));
}
Also used : Arrays(java.util.Arrays) KubernetesClientBuildItem(io.quarkus.kubernetes.client.spi.KubernetesClientBuildItem) KubernetesEnvBuildItem(io.quarkus.kubernetes.spi.KubernetesEnvBuildItem) ContainerImageBuilderBuildItem(io.quarkus.container.spi.ContainerImageBuilderBuildItem) LogWatch(io.fabric8.kubernetes.client.dsl.LogWatch) BuildProducer(io.quarkus.deployment.annotations.BuildProducer) ArchiveRootBuildItem(io.quarkus.deployment.builditem.ArchiveRootBuildItem) ByteArrayInputStream(java.io.ByteArrayInputStream) Map(java.util.Map) Build(io.fabric8.openshift.api.model.Build) KubernetesCommandBuildItem(io.quarkus.kubernetes.spi.KubernetesCommandBuildItem) Path(java.nio.file.Path) IsNormalNotRemoteDev(io.quarkus.deployment.IsNormalNotRemoteDev) KubernetesClientException(io.fabric8.kubernetes.client.KubernetesClientException) NativeImageBuildItem(io.quarkus.deployment.pkg.builditem.NativeImageBuildItem) Predicate(java.util.function.Predicate) ContainerImagePushRequestBuildItem(io.quarkus.container.spi.ContainerImagePushRequestBuildItem) JarBuildItem(io.quarkus.deployment.pkg.builditem.JarBuildItem) Collection(java.util.Collection) ContainerImageConfig(io.quarkus.container.image.deployment.ContainerImageConfig) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Collectors(java.util.stream.Collectors) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) Executors(java.util.concurrent.Executors) PackageConfig(io.quarkus.deployment.pkg.PackageConfig) ContainerImageInfoBuildItem(io.quarkus.container.spi.ContainerImageInfoBuildItem) Config(io.fabric8.kubernetes.client.Config) List(java.util.List) Stream(java.util.stream.Stream) ResolvedDependency(io.quarkus.maven.dependency.ResolvedDependency) Optional(java.util.Optional) Secret(io.fabric8.kubernetes.api.model.Secret) AvailableContainerImageExtensionBuildItem(io.quarkus.container.spi.AvailableContainerImageExtensionBuildItem) Logger(org.jboss.logging.Logger) KubernetesClientErrorHandler(io.quarkus.kubernetes.client.deployment.KubernetesClientErrorHandler) CurateOutcomeBuildItem(io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem) CompiledJavaVersionBuildItem(io.quarkus.deployment.pkg.builditem.CompiledJavaVersionBuildItem) StandardCopyOption(java.nio.file.StandardCopyOption) ArrayList(java.util.ArrayList) ImageUtil(io.quarkus.container.image.deployment.util.ImageUtil) BuildStep(io.quarkus.deployment.annotations.BuildStep) BaseImageInfoBuildItem(io.quarkus.container.spi.BaseImageInfoBuildItem) ImageStream(io.fabric8.openshift.api.model.ImageStream) KubernetesList(io.fabric8.kubernetes.api.model.KubernetesList) ContainerImageBuildRequestBuildItem(io.quarkus.container.spi.ContainerImageBuildRequestBuildItem) Files(java.nio.file.Files) Executor(java.util.concurrent.Executor) ArtifactResultBuildItem(io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem) IOException(java.io.IOException) Serialization(io.dekorate.utils.Serialization) OpenShiftClient(io.fabric8.openshift.client.OpenShiftClient) InputStreamReader(java.io.InputStreamReader) NativeBuild(io.quarkus.deployment.pkg.steps.NativeBuild) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) Clients(io.dekorate.utils.Clients) BuildConfig(io.fabric8.openshift.api.model.BuildConfig) OutputTargetBuildItem(io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem) Closeable(java.io.Closeable) GeneratedFileSystemResourceBuildItem(io.quarkus.deployment.builditem.GeneratedFileSystemResourceBuildItem) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) BufferedReader(java.io.BufferedReader) Collections(java.util.Collections) ContainerImageBuilderBuildItem(io.quarkus.container.spi.ContainerImageBuilderBuildItem) ArtifactResultBuildItem(io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem) GeneratedFileSystemResourceBuildItem(io.quarkus.deployment.builditem.GeneratedFileSystemResourceBuildItem) BuildStep(io.quarkus.deployment.annotations.BuildStep)

Example 2 with ContainerImageInfoBuildItem

use of io.quarkus.container.spi.ContainerImageInfoBuildItem in project quarkus by quarkusio.

the class BuildpackProcessor method runBuildpackBuild.

private String runBuildpackBuild(BuildpackConfig buildpackConfig, ContainerImageInfoBuildItem containerImage, ContainerImageConfig containerImageConfig, Optional<ContainerImagePushRequestBuildItem> pushRequest, OutputTargetBuildItem outputTarget, boolean isNativeBuild) {
    Map<ProjectDirs, Path> dirs = getPaths(outputTarget);
    log.debug("Using target dir of " + dirs.get(ProjectDirs.TARGET));
    log.debug("Using source root of " + dirs.get(ProjectDirs.SOURCE));
    log.debug("Using project root of " + dirs.get(ProjectDirs.ROOT));
    String targetImageName = containerImage.getImage().toString();
    log.debug("Using Destination image of " + targetImageName);
    Map<String, String> envMap = new HashMap<>(buildpackConfig.builderEnv);
    if (!envMap.isEmpty()) {
        log.info("Using builder environment of " + envMap);
    }
    // Let's explicitly disable build and push during the build to avoid inception style builds
    envMap.put(QUARKUS_CONTAINER_IMAGE_BUILD, "false");
    envMap.put(QUARKUS_CONTAINER_IMAGE_PUSH, "false");
    log.info("Initiating Buildpack build");
    Buildpack buildpack = Buildpack.builder().addNewFileContent(dirs.get(ProjectDirs.ROOT).toFile()).withFinalImage(targetImageName).withEnvironment(envMap).withLogLevel(buildpackConfig.logLevel).withPullTimeoutSeconds(buildpackConfig.pullTimeoutSeconds).withLogger(new BuildpackLogger()).accept(BuildpackBuilder.class, b -> {
        if (isNativeBuild) {
            buildpackConfig.nativeBuilderImage.ifPresent(i -> b.withBuilderImage(i));
        } else {
            buildpackConfig.jvmBuilderImage.ifPresent(i -> b.withBuilderImage(i));
        }
        if (buildpackConfig.runImage.isPresent()) {
            log.info("Using Run image of " + buildpackConfig.runImage.get());
            b.withRunImage(buildpackConfig.runImage.get());
        }
        if (buildpackConfig.dockerHost.isPresent()) {
            log.info("Using DockerHost of " + buildpackConfig.dockerHost.get());
            b.withDockerHost(buildpackConfig.dockerHost.get());
        }
    }).build();
    if (buildpack.getExitCode() != 0) {
        throw new IllegalStateException("Buildpack build failed");
    }
    log.info("Buildpack build complete");
    if (containerImageConfig.isPushExplicitlyEnabled() || pushRequest.isPresent()) {
        if (!containerImageConfig.registry.isPresent()) {
            log.info("No container image registry was set, so 'docker.io' will be used");
        }
        AuthConfig authConfig = new AuthConfig();
        authConfig.withRegistryAddress(containerImageConfig.registry.orElse("docker.io"));
        containerImageConfig.username.ifPresent(u -> authConfig.withUsername(u));
        containerImageConfig.password.ifPresent(p -> authConfig.withPassword(p));
        log.info("Pushing image to " + authConfig.getRegistryAddress());
        Stream.concat(Stream.of(containerImage.getImage()), containerImage.getAdditionalImageTags().stream()).forEach(i -> {
            ResultCallback.Adapter<PushResponseItem> callback = buildpack.getDockerClient().pushImageCmd(i).start();
            try {
                callback.awaitCompletion();
                log.info("Push complete");
            } catch (Exception e) {
                throw new IllegalStateException(e);
            }
        });
    }
    return targetImageName;
}
Also used : Path(java.nio.file.Path) Logger(org.jboss.logging.Logger) ContainerImageBuilderBuildItem(io.quarkus.container.spi.ContainerImageBuilderBuildItem) HashMap(java.util.HashMap) CurateOutcomeBuildItem(io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem) BuildpackBuilder(dev.snowdrop.buildpack.BuildpackBuilder) BuildProducer(io.quarkus.deployment.annotations.BuildProducer) Buildpack(dev.snowdrop.buildpack.Buildpack) BuildStep(io.quarkus.deployment.annotations.BuildStep) Map(java.util.Map) Path(java.nio.file.Path) IsNormalNotRemoteDev(io.quarkus.deployment.IsNormalNotRemoteDev) ContainerImageLabelBuildItem(io.quarkus.container.spi.ContainerImageLabelBuildItem) AuthConfig(com.github.dockerjava.api.model.AuthConfig) ContainerImageBuildRequestBuildItem(io.quarkus.container.spi.ContainerImageBuildRequestBuildItem) NativeImageBuildItem(io.quarkus.deployment.pkg.builditem.NativeImageBuildItem) ContainerImagePushRequestBuildItem(io.quarkus.container.spi.ContainerImagePushRequestBuildItem) JarBuildItem(io.quarkus.deployment.pkg.builditem.JarBuildItem) PathsUtil.findMainSourcesRoot(io.quarkus.container.util.PathsUtil.findMainSourcesRoot) ContainerImageConfig(io.quarkus.container.image.deployment.ContainerImageConfig) ArtifactResultBuildItem(io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem) NativeBuild(io.quarkus.deployment.pkg.steps.NativeBuild) PackageConfig(io.quarkus.deployment.pkg.PackageConfig) ContainerImageInfoBuildItem(io.quarkus.container.spi.ContainerImageInfoBuildItem) List(java.util.List) Stream(java.util.stream.Stream) OutputTargetBuildItem(io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem) Optional(java.util.Optional) ResultCallback(com.github.dockerjava.api.async.ResultCallback) PushResponseItem(com.github.dockerjava.api.model.PushResponseItem) NativeBinaryUtil(io.quarkus.container.image.deployment.util.NativeBinaryUtil) AvailableContainerImageExtensionBuildItem(io.quarkus.container.spi.AvailableContainerImageExtensionBuildItem) AppCDSResultBuildItem(io.quarkus.deployment.pkg.builditem.AppCDSResultBuildItem) Collections(java.util.Collections) MainClassBuildItem(io.quarkus.deployment.builditem.MainClassBuildItem) ResultCallback(com.github.dockerjava.api.async.ResultCallback) HashMap(java.util.HashMap) PushResponseItem(com.github.dockerjava.api.model.PushResponseItem) AuthConfig(com.github.dockerjava.api.model.AuthConfig) BuildpackBuilder(dev.snowdrop.buildpack.BuildpackBuilder) Buildpack(dev.snowdrop.buildpack.Buildpack)

Example 3 with ContainerImageInfoBuildItem

use of io.quarkus.container.spi.ContainerImageInfoBuildItem in project quarkus by quarkusio.

the class ContainerImageProcessor method publishImageInfo.

@BuildStep
public void publishImageInfo(ApplicationInfoBuildItem app, ContainerImageConfig containerImageConfig, Optional<FallbackContainerImageRegistryBuildItem> containerImageRegistry, Capabilities capabilities, BuildProducer<ContainerImageInfoBuildItem> containerImage) {
    ensureSingleContainerImageExtension(capabilities);
    // additionalTags are used even containerImageConfig.image is set because that string cannot contain multiple tags
    if (containerImageConfig.additionalTags.isPresent()) {
        for (String additionalTag : containerImageConfig.additionalTags.get()) {
            if (!ImageReference.isValidTag(additionalTag)) {
                throw new IllegalArgumentException("The supplied additional container-image tag '" + additionalTag + "' is invalid");
            }
        }
    }
    String effectiveGroup = containerImageConfig.getEffectiveGroup().orElse("");
    // This can be the case when running inside kubernetes/minikube in dev-mode. Instead of failing, we should just catch and log.
    if (UNKNOWN_USER.equals(effectiveGroup)) {
        log.warn("Can't get the current user name, which is used as default for container image group. Can't publish container image info.");
        return;
    }
    // if the user supplied the entire image string, use it
    if (containerImageConfig.image.isPresent()) {
        ImageReference imageReference = ImageReference.parse(containerImageConfig.image.get());
        String repository = imageReference.getRepository();
        containerImage.produce(new ContainerImageInfoBuildItem(Optional.of(imageReference.getRegistry()), repository, imageReference.getTag(), containerImageConfig.additionalTags.orElse(Collections.emptyList())));
        return;
    }
    String registry = containerImageConfig.registry.orElseGet(() -> containerImageRegistry.map(FallbackContainerImageRegistryBuildItem::getRegistry).orElse(null));
    if ((registry != null) && !ImageReference.isValidRegistry(registry)) {
        throw new IllegalArgumentException("The supplied container-image registry '" + registry + "' is invalid");
    }
    String effectiveName = containerImageConfig.name.orElse(app.getName());
    String repository = (containerImageConfig.getEffectiveGroup().map(s -> s + "/").orElse("")) + effectiveName;
    if (!ImageReference.isValidRepository(repository)) {
        throw new IllegalArgumentException("The supplied combination of container-image group '" + effectiveGroup + "' and name '" + effectiveName + "' is invalid");
    }
    final String effectiveTag = containerImageConfig.tag.orElse(app.getVersion());
    if (!ImageReference.isValidTag(effectiveTag)) {
        throw new IllegalArgumentException("The supplied container-image tag '" + effectiveTag + "' is invalid");
    }
    containerImage.produce(new ContainerImageInfoBuildItem(Optional.ofNullable(registry), containerImageConfig.getEffectiveGroup(), effectiveName, effectiveTag, containerImageConfig.additionalTags.orElse(Collections.emptyList())));
}
Also used : ContainerImageBuildRequestBuildItem(io.quarkus.container.spi.ContainerImageBuildRequestBuildItem) ContainerImagePushRequestBuildItem(io.quarkus.container.spi.ContainerImagePushRequestBuildItem) Logger(org.jboss.logging.Logger) EnablementUtil(io.quarkus.container.image.deployment.util.EnablementUtil) ArtifactResultBuildItem(io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem) BuildProducer(io.quarkus.deployment.annotations.BuildProducer) ContainerImageInfoBuildItem(io.quarkus.container.spi.ContainerImageInfoBuildItem) Capabilities(io.quarkus.deployment.Capabilities) BuildStep(io.quarkus.deployment.annotations.BuildStep) SuppressNonRuntimeConfigChangedWarningBuildItem(io.quarkus.deployment.builditem.SuppressNonRuntimeConfigChangedWarningBuildItem) FallbackContainerImageRegistryBuildItem(io.quarkus.container.spi.FallbackContainerImageRegistryBuildItem) ImageReference(io.quarkus.container.spi.ImageReference) ApplicationInfoBuildItem(io.quarkus.deployment.builditem.ApplicationInfoBuildItem) Optional(java.util.Optional) NativeSourcesBuild(io.quarkus.deployment.pkg.steps.NativeSourcesBuild) Collections(java.util.Collections) ImageReference(io.quarkus.container.spi.ImageReference) ContainerImageInfoBuildItem(io.quarkus.container.spi.ContainerImageInfoBuildItem) FallbackContainerImageRegistryBuildItem(io.quarkus.container.spi.FallbackContainerImageRegistryBuildItem) BuildStep(io.quarkus.deployment.annotations.BuildStep)

Example 4 with ContainerImageInfoBuildItem

use of io.quarkus.container.spi.ContainerImageInfoBuildItem in project quarkus by quarkusio.

the class ContainerImageInfoTest method whenPublishImageInfo.

private void whenPublishImageInfo() {
    BuildTimeConfigurationReader reader = new BuildTimeConfigurationReader(Collections.singletonList(ContainerImageConfig.class));
    SmallRyeConfigBuilder builder = ConfigUtils.configBuilder(false, LaunchMode.NORMAL);
    DefaultValuesConfigurationSource ds = new DefaultValuesConfigurationSource(reader.getBuildTimePatternMap());
    PropertiesConfigSource pcs = new PropertiesConfigSource(new Properties(), "Test Properties");
    builder.withSources(ds, pcs);
    SmallRyeConfig src = builder.build();
    BuildTimeConfigurationReader.ReadResult readResult = reader.readConfiguration(src);
    ContainerImageConfig containerImageConfig = (ContainerImageConfig) readResult.requireObjectForClass(ContainerImageConfig.class);
    ApplicationInfoBuildItem app = new ApplicationInfoBuildItem(Optional.of(APP_NAME), Optional.of(APP_VERSION));
    Capabilities capabilities = new Capabilities(Collections.emptySet());
    BuildProducer<ContainerImageInfoBuildItem> containerImage = actualImageConfig -> actualContainerImageInfo = actualImageConfig;
    ContainerImageProcessor processor = new ContainerImageProcessor();
    processor.publishImageInfo(app, containerImageConfig, Optional.empty(), capabilities, containerImage);
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) BeforeEach(org.junit.jupiter.api.BeforeEach) ConfigUtils(io.quarkus.runtime.configuration.ConfigUtils) Properties(java.util.Properties) LaunchMode(io.quarkus.runtime.LaunchMode) SmallRyeConfig(io.smallrye.config.SmallRyeConfig) BuildTimeConfigurationReader(io.quarkus.deployment.configuration.BuildTimeConfigurationReader) BuildProducer(io.quarkus.deployment.annotations.BuildProducer) ContainerImageInfoBuildItem(io.quarkus.container.spi.ContainerImageInfoBuildItem) DefaultValuesConfigurationSource(io.quarkus.deployment.configuration.DefaultValuesConfigurationSource) AfterAll(org.junit.jupiter.api.AfterAll) Test(org.junit.jupiter.api.Test) Capabilities(io.quarkus.deployment.Capabilities) BeforeAll(org.junit.jupiter.api.BeforeAll) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) ApplicationInfoBuildItem(io.quarkus.deployment.builditem.ApplicationInfoBuildItem) SmallRyeConfigBuilder(io.smallrye.config.SmallRyeConfigBuilder) Optional(java.util.Optional) PropertiesConfigSource(io.smallrye.config.PropertiesConfigSource) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Collections(java.util.Collections) PropertiesConfigSource(io.smallrye.config.PropertiesConfigSource) DefaultValuesConfigurationSource(io.quarkus.deployment.configuration.DefaultValuesConfigurationSource) Properties(java.util.Properties) BuildTimeConfigurationReader(io.quarkus.deployment.configuration.BuildTimeConfigurationReader) SmallRyeConfigBuilder(io.smallrye.config.SmallRyeConfigBuilder) SmallRyeConfig(io.smallrye.config.SmallRyeConfig) Capabilities(io.quarkus.deployment.Capabilities) ContainerImageInfoBuildItem(io.quarkus.container.spi.ContainerImageInfoBuildItem) ApplicationInfoBuildItem(io.quarkus.deployment.builditem.ApplicationInfoBuildItem)

Example 5 with ContainerImageInfoBuildItem

use of io.quarkus.container.spi.ContainerImageInfoBuildItem in project quarkus by quarkusio.

the class S2iProcessor method s2iBuildFromJar.

@BuildStep(onlyIf = { IsNormalNotRemoteDev.class, S2iBuild.class }, onlyIfNot = NativeBuild.class)
public void s2iBuildFromJar(S2iConfig s2iConfig, ContainerImageConfig containerImageConfig, KubernetesClientBuildItem kubernetesClient, ContainerImageInfoBuildItem containerImage, ArchiveRootBuildItem archiveRoot, OutputTargetBuildItem out, PackageConfig packageConfig, List<GeneratedFileSystemResourceBuildItem> generatedResources, Optional<ContainerImageBuildRequestBuildItem> buildRequest, Optional<ContainerImagePushRequestBuildItem> pushRequest, BuildProducer<ArtifactResultBuildItem> artifactResultProducer, BuildProducer<ContainerImageBuilderBuildItem> containerImageBuilder, // used to ensure that the jar has been built
JarBuildItem jar) {
    if (containerImageConfig.isBuildExplicitlyDisabled()) {
        return;
    }
    if (!containerImageConfig.isBuildExplicitlyEnabled() && !containerImageConfig.isPushExplicitlyEnabled() && !buildRequest.isPresent() && !pushRequest.isPresent()) {
        return;
    }
    Optional<GeneratedFileSystemResourceBuildItem> openshiftYml = generatedResources.stream().filter(r -> r.getName().endsWith("kubernetes" + File.separator + "openshift.yml")).findFirst();
    if (openshiftYml.isEmpty()) {
        LOG.warn("No Openshift manifests were generated so no s2i process will be taking place");
        return;
    }
    String namespace = Optional.ofNullable(kubernetesClient.getClient().getNamespace()).orElse("default");
    LOG.info("Performing s2i binary build with jar on server: " + kubernetesClient.getClient().getMasterUrl() + " in namespace:" + namespace + ".");
    createContainerImage(kubernetesClient, openshiftYml.get(), s2iConfig, out.getOutputDirectory(), jar.getPath(), out.getOutputDirectory().resolve("lib"));
    artifactResultProducer.produce(new ArtifactResultBuildItem(null, "jar-container", Collections.emptyMap()));
    containerImageBuilder.produce(new ContainerImageBuilderBuildItem(S2I));
}
Also used : Arrays(java.util.Arrays) KubernetesClientBuildItem(io.quarkus.kubernetes.client.spi.KubernetesClientBuildItem) KubernetesEnvBuildItem(io.quarkus.kubernetes.spi.KubernetesEnvBuildItem) ContainerImageBuilderBuildItem(io.quarkus.container.spi.ContainerImageBuilderBuildItem) LogWatch(io.fabric8.kubernetes.client.dsl.LogWatch) BuildProducer(io.quarkus.deployment.annotations.BuildProducer) ArchiveRootBuildItem(io.quarkus.deployment.builditem.ArchiveRootBuildItem) ByteArrayInputStream(java.io.ByteArrayInputStream) Map(java.util.Map) Build(io.fabric8.openshift.api.model.Build) KubernetesCommandBuildItem(io.quarkus.kubernetes.spi.KubernetesCommandBuildItem) Path(java.nio.file.Path) IsNormalNotRemoteDev(io.quarkus.deployment.IsNormalNotRemoteDev) KubernetesClientException(io.fabric8.kubernetes.client.KubernetesClientException) NativeImageBuildItem(io.quarkus.deployment.pkg.builditem.NativeImageBuildItem) Predicate(java.util.function.Predicate) ContainerImagePushRequestBuildItem(io.quarkus.container.spi.ContainerImagePushRequestBuildItem) JarBuildItem(io.quarkus.deployment.pkg.builditem.JarBuildItem) Collection(java.util.Collection) ContainerImageConfig(io.quarkus.container.image.deployment.ContainerImageConfig) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Collectors(java.util.stream.Collectors) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) Executors(java.util.concurrent.Executors) PackageConfig(io.quarkus.deployment.pkg.PackageConfig) ContainerImageInfoBuildItem(io.quarkus.container.spi.ContainerImageInfoBuildItem) Config(io.fabric8.kubernetes.client.Config) List(java.util.List) Stream(java.util.stream.Stream) ResolvedDependency(io.quarkus.maven.dependency.ResolvedDependency) Optional(java.util.Optional) Secret(io.fabric8.kubernetes.api.model.Secret) AvailableContainerImageExtensionBuildItem(io.quarkus.container.spi.AvailableContainerImageExtensionBuildItem) Logger(org.jboss.logging.Logger) KubernetesClientErrorHandler(io.quarkus.kubernetes.client.deployment.KubernetesClientErrorHandler) CurateOutcomeBuildItem(io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem) CompiledJavaVersionBuildItem(io.quarkus.deployment.pkg.builditem.CompiledJavaVersionBuildItem) StandardCopyOption(java.nio.file.StandardCopyOption) ArrayList(java.util.ArrayList) ImageUtil(io.quarkus.container.image.deployment.util.ImageUtil) BuildStep(io.quarkus.deployment.annotations.BuildStep) BaseImageInfoBuildItem(io.quarkus.container.spi.BaseImageInfoBuildItem) ImageStream(io.fabric8.openshift.api.model.ImageStream) KubernetesList(io.fabric8.kubernetes.api.model.KubernetesList) ContainerImageBuildRequestBuildItem(io.quarkus.container.spi.ContainerImageBuildRequestBuildItem) Files(java.nio.file.Files) Executor(java.util.concurrent.Executor) ArtifactResultBuildItem(io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem) IOException(java.io.IOException) Serialization(io.dekorate.utils.Serialization) OpenShiftClient(io.fabric8.openshift.client.OpenShiftClient) InputStreamReader(java.io.InputStreamReader) NativeBuild(io.quarkus.deployment.pkg.steps.NativeBuild) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) Clients(io.dekorate.utils.Clients) BuildConfig(io.fabric8.openshift.api.model.BuildConfig) OutputTargetBuildItem(io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem) Closeable(java.io.Closeable) GeneratedFileSystemResourceBuildItem(io.quarkus.deployment.builditem.GeneratedFileSystemResourceBuildItem) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) BufferedReader(java.io.BufferedReader) Collections(java.util.Collections) ContainerImageBuilderBuildItem(io.quarkus.container.spi.ContainerImageBuilderBuildItem) ArtifactResultBuildItem(io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem) GeneratedFileSystemResourceBuildItem(io.quarkus.deployment.builditem.GeneratedFileSystemResourceBuildItem) BuildStep(io.quarkus.deployment.annotations.BuildStep)

Aggregations

ContainerImageInfoBuildItem (io.quarkus.container.spi.ContainerImageInfoBuildItem)8 BuildProducer (io.quarkus.deployment.annotations.BuildProducer)8 Optional (java.util.Optional)8 BuildStep (io.quarkus.deployment.annotations.BuildStep)7 ArtifactResultBuildItem (io.quarkus.deployment.pkg.builditem.ArtifactResultBuildItem)7 Collections (java.util.Collections)7 Logger (org.jboss.logging.Logger)7 ContainerImageBuildRequestBuildItem (io.quarkus.container.spi.ContainerImageBuildRequestBuildItem)6 ContainerImagePushRequestBuildItem (io.quarkus.container.spi.ContainerImagePushRequestBuildItem)6 IsNormalNotRemoteDev (io.quarkus.deployment.IsNormalNotRemoteDev)6 OutputTargetBuildItem (io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem)6 Path (java.nio.file.Path)6 List (java.util.List)6 Map (java.util.Map)6 Clients (io.dekorate.utils.Clients)5 Serialization (io.dekorate.utils.Serialization)5 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)5 KubernetesList (io.fabric8.kubernetes.api.model.KubernetesList)5 Config (io.fabric8.kubernetes.client.Config)5 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)5