Skip to content

Commit

Permalink
feat: allow inclusion of image copy to pipeline
Browse files Browse the repository at this point in the history
Support both codepipeline and pipelines
  • Loading branch information
Hi-Fi committed Sep 27, 2022
1 parent fbeeee1 commit 8804da5
Show file tree
Hide file tree
Showing 11 changed files with 2,834 additions and 595 deletions.
68 changes: 4 additions & 64 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

Name|Description
----|-----------
[DockerImageName](#cdk-ecr-deployment-dockerimagename)|*No description*
[ECRDeployment](#cdk-ecr-deployment-ecrdeployment)|*No description*
[S3ArchiveName](#cdk-ecr-deployment-s3archivename)|*No description*


**Structs**
Expand All @@ -27,36 +25,6 @@ Name|Description



## class DockerImageName <a id="cdk-ecr-deployment-dockerimagename"></a>



__Implements__: [IImageName](#cdk-ecr-deployment-iimagename)

### Initializer




```ts
new DockerImageName(name: string, creds?: ICredentials)
```

* **name** (<code>string</code>) *No description*
* **creds** (<code>[ICredentials](#cdk-ecr-deployment-icredentials)</code>) *No description*



### Properties


Name | Type | Description
-----|------|-------------
**uri** | <code>string</code> | The uri of the docker image.
**creds**? | <code>[ICredentials](#cdk-ecr-deployment-icredentials)</code> | __*Optional*__



## class ECRDeployment <a id="cdk-ecr-deployment-ecrdeployment"></a>


Expand All @@ -82,8 +50,10 @@ new ECRDeployment(scope: Construct, id: string, props: ECRDeploymentProps)
* **environment** (<code>Map<string, string></code>) The environment variable to set. __*Optional*__
* **memoryLimit** (<code>number</code>) The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket. __*Default*__: 512
* **role** (<code>[aws_iam.IRole](#aws-cdk-lib-aws-iam-irole)</code>) Execution role associated with this function. __*Default*__: A role is automatically created
* **stage** (<code>[aws_codepipeline.IStage](#aws-cdk-lib-aws-codepipeline-istage)</code>) CodePipeline Stage to include lambda to. __*Optional*__
* **vpc** (<code>[aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc)</code>) The VPC network to place the deployment lambda handler in. __*Default*__: None
* **vpcSubnets** (<code>[aws_ec2.SubnetSelection](#aws-cdk-lib-aws-ec2-subnetselection)</code>) Where in the VPC to place the deployment lambda handler. __*Default*__: the Vpc default strategy if not specified
* **wave** (<code>[pipelines.Wave](#aws-cdk-lib-pipelines-wave)</code>) Pipelines Wave to include lambda to. __*Optional*__


### Methods
Expand All @@ -104,37 +74,6 @@ __Returns__:



## class S3ArchiveName <a id="cdk-ecr-deployment-s3archivename"></a>



__Implements__: [IImageName](#cdk-ecr-deployment-iimagename)

### Initializer




```ts
new S3ArchiveName(p: string, ref?: string, creds?: ICredentials)
```

* **p** (<code>string</code>) *No description*
* **ref** (<code>string</code>) *No description*
* **creds** (<code>[ICredentials](#cdk-ecr-deployment-icredentials)</code>) *No description*



### Properties


Name | Type | Description
-----|------|-------------
**uri** | <code>string</code> | The uri of the docker image.
**creds**? | <code>[ICredentials](#cdk-ecr-deployment-icredentials)</code> | __*Optional*__



## struct ECRDeploymentProps <a id="cdk-ecr-deployment-ecrdeploymentprops"></a>


Expand All @@ -150,8 +89,10 @@ Name | Type | Description
**environment**? | <code>Map<string, string></code> | The environment variable to set.<br/>__*Optional*__
**memoryLimit**? | <code>number</code> | The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket.<br/>__*Default*__: 512
**role**? | <code>[aws_iam.IRole](#aws-cdk-lib-aws-iam-irole)</code> | Execution role associated with this function.<br/>__*Default*__: A role is automatically created
**stage**? | <code>[aws_codepipeline.IStage](#aws-cdk-lib-aws-codepipeline-istage)</code> | CodePipeline Stage to include lambda to.<br/>__*Optional*__
**vpc**? | <code>[aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc)</code> | The VPC network to place the deployment lambda handler in.<br/>__*Default*__: None
**vpcSubnets**? | <code>[aws_ec2.SubnetSelection](#aws-cdk-lib-aws-ec2-subnetselection)</code> | Where in the VPC to place the deployment lambda handler.<br/>__*Default*__: the Vpc default strategy if not specified
**wave**? | <code>[pipelines.Wave](#aws-cdk-lib-pipelines-wave)</code> | Pipelines Wave to include lambda to.<br/>__*Optional*__



Expand All @@ -172,7 +113,6 @@ Name | Type | Description

## interface IImageName <a id="cdk-ecr-deployment-iimagename"></a>

__Implemented by__: [DockerImageName](#cdk-ecr-deployment-dockerimagename), [S3ArchiveName](#cdk-ecr-deployment-s3archivename)



Expand Down
16 changes: 4 additions & 12 deletions lambda/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,34 @@ module cdk-ecr-deployment-handler
go 1.15

require (
github.com/Microsoft/hcsshim v0.9.4 // indirect
github.com/aws/aws-lambda-go v1.34.1
github.com/aws/aws-sdk-go-v2 v1.16.14
github.com/aws/aws-sdk-go-v2 v1.16.16
github.com/aws/aws-sdk-go-v2/config v1.17.5
github.com/aws/aws-sdk-go-v2/service/codepipeline v1.13.17
github.com/aws/aws-sdk-go-v2/service/ecr v1.17.16
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.9
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.22
github.com/containerd/cgroups v1.0.4 // indirect
github.com/containerd/containerd v1.6.8 // indirect
github.com/containers/image/v5 v5.22.0
github.com/docker/go-units v0.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/gorilla/mux v1.8.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/letsencrypt/boulder v0.0.0-20220903145035-27142caeefc4 // indirect
github.com/magefile/mage v1.13.0 // indirect
github.com/megaproaktiv/awsmock v0.1.4 // indirect
github.com/megaproaktiv/awsmock v0.1.4
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/runc v1.1.4 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.13.0 // indirect
github.com/rivo/uniseg v0.3.4 // indirect
github.com/sigstore/sigstore v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.0
github.com/sylabs/release-tools v0.1.0 // indirect
github.com/sylabs/sif/v2 v2.7.2 // indirect
github.com/theupdateframework/go-tuf v0.3.2 // indirect
github.com/urfave/cli/v2 v2.4.0 // indirect
github.com/vbauerster/mpb/v7 v7.5.2 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect
golang.org/x/sys v0.0.0-20220906135438-9e1f76180b77 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
google.golang.org/genproto v0.0.0-20220902135211-223410557253 // indirect
google.golang.org/grpc v1.49.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
)
Loading

0 comments on commit 8804da5

Please sign in to comment.