Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(codebuild): add functionality to allow using private registry an… #2796

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
843 changes: 843 additions & 0 deletions packages/@aws-cdk/assets-docker/.jsii

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions packages/@aws-cdk/assets-docker/lib/adopted-repository.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import ecr = require('@aws-cdk/aws-ecr');
import iam = require('@aws-cdk/aws-iam');
import cdk = require('@aws-cdk/cdk');
interface AdoptedRepositoryProps {
/**
* An ECR repository to adopt. Once adopted, the repository will
* practically become part of this stack, so it will be removed when
* the stack is deleted.
*/
repositoryName: string;
}
/**
* An internal class used to adopt an ECR repository used for the locally built
* image into the stack.
*
* Since the repository is not created by the stack (but by the CDK toolkit),
* adopting will make the repository "owned" by the stack. It will be cleaned
* up when the stack gets deleted, to avoid leaving orphaned repositories on
* stack cleanup.
*/
export declare class AdoptedRepository extends ecr.RepositoryBase {
private readonly props;
readonly repositoryName: string;
readonly repositoryArn: string;
private readonly policyDocument;
constructor(scope: cdk.Construct, id: string, props: AdoptedRepositoryProps);
/**
* Export this repository from the stack
*/
export(): AdoptedRepositoryProps;
/**
* Adds a statement to the repository resource policy.
*
* Contrary to normal imported repositories, which no-op here, we can
* use the custom resource to modify the ECR resource policy if needed.
*/
addToResourcePolicy(statement: iam.PolicyStatement): void;
}
export {};
70 changes: 70 additions & 0 deletions packages/@aws-cdk/assets-docker/lib/adopted-repository.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions packages/@aws-cdk/assets-docker/lib/image-asset.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import assets = require('@aws-cdk/assets');
import ecr = require('@aws-cdk/aws-ecr');
import cdk = require('@aws-cdk/cdk');
export interface DockerImageAssetProps extends assets.CopyOptions {
/**
* The directory where the Dockerfile is stored
*/
readonly directory: string;
/**
* ECR repository name
*
* Specify this property if you need to statically address the image, e.g.
* from a Kubernetes Pod. Note, this is only the repository name, without the
* registry and the tag parts.
*
* @default automatically derived from the asset's ID.
*/
readonly repositoryName?: string;
/**
* Build args to pass to the `docker build` command
*
* @default no build args are passed
*/
readonly buildArgs?: {
[key: string]: string;
};
}
/**
* An asset that represents a Docker image.
*
* The image will be created in build time and uploaded to an ECR repository.
*/
export declare class DockerImageAsset extends cdk.Construct implements assets.IAsset {
/**
* The full URI of the image (including a tag). Use this reference to pull
* the asset.
*/
imageUri: string;
/**
* Repository where the image is stored
*/
repository: ecr.IRepository;
readonly sourceHash: string;
readonly artifactHash: string;
/**
* Directory where the source files are stored
*/
private readonly directory;
constructor(scope: cdk.Construct, id: string, props: DockerImageAssetProps);
}
Loading