All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.cdklabs.cdk.docker.image.deployment.Source Maven / Gradle / Ivy

Go to download

This module allows you to copy docker image assets to a repository you control. This can be necessary if you want to build a Docker image in one CDK app and consume it in a different app or outside the CDK.

There is a newer version: 0.0.660
Show newest version
package io.github.cdklabs.cdk.docker.image.deployment;

/**
 * Specifies docker image deployment source.
 * 

* Usage: *

*

 * import * as path from 'path';
 * const path = path.join(__dirname, 'path/to/directory');
 * const sourceDirectory = Source.directory(path);
 * 
*

* or with additional assetOptions *

*

 * import * as path from 'path';
 * const path = path.join(__dirname, 'path/to/directory');
 * const sourceDirectory = Source.directory(path, {
 *    file: 'Dockerfile.api',
 *    buildArgs: {
 *      HTTP_PROXY: 'http://10.20.30.2:1234'
 *    }
 * })
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-10-20T01:05:56.957Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.docker.image.deployment.$Module.class, fqn = "cdk-docker-image-deployment.Source") public abstract class Source extends software.amazon.jsii.JsiiObject { protected Source(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected Source(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected Source() { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); } /** * Uses a local image built from a Dockerfile in a local directory as the source. *

* @param path

  • path to the directory containing your Dockerfile (not a path to a file).
This parameter is required. * @param assetOptions */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.Source directory(final @org.jetbrains.annotations.NotNull java.lang.String path, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecr.assets.DockerImageAssetOptions assetOptions) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.docker.image.deployment.Source.class, "directory", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.docker.image.deployment.Source.class), new Object[] { java.util.Objects.requireNonNull(path, "path is required"), assetOptions }); } /** * Uses a local image built from a Dockerfile in a local directory as the source. *

* @param path

  • path to the directory containing your Dockerfile (not a path to a file).
This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.Source directory(final @org.jetbrains.annotations.NotNull java.lang.String path) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.docker.image.deployment.Source.class, "directory", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.docker.image.deployment.Source.class), new Object[] { java.util.Objects.requireNonNull(path, "path is required") }); } /** * Bind grants the CodeBuild role permissions to pull from a repository if necessary. *

* Bind should be invoked by the caller to get the SourceConfig. *

* @param scope This parameter is required. * @param context This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public abstract @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceContext context); /** * A proxy class which represents a concrete javascript instance of this type. */ @software.amazon.jsii.Internal private static final class Jsii$Proxy extends io.github.cdklabs.cdk.docker.image.deployment.Source { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } /** * Bind grants the CodeBuild role permissions to pull from a repository if necessary. *

* Bind should be invoked by the caller to get the SourceConfig. *

* @param scope This parameter is required. * @param context This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.SourceContext context) { return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.docker.image.deployment.SourceConfig.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(context, "context is required") }); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy