DynamoDB Image Buildkite Plugin
A Buildkite plugin that introspects the schema of DynamoDB tables and then publishes linux/arm64 amazon/dynamodb-local images with these schemas to ECR.
Publishing multi-architecture images is no longer supported. These were removed since all observed plugin usage occurs on arm64 architectures and it simplifies image tagging in ECR. If you have a use case for multi-architecture images, please open an issue.
Usage Requirements
For this plugin to work, you must ensure the following:
- The AWS credentials to access your table are available in the environment
- Docker is logged into ECR (e.g., by using ecr-buildkite-plugin)
Example
This will create an amazon/dynamodb-local image containing the tables Jobs and Applications and publish it to the ECR repository with URI 123456789123.dkr.ecr.ap-southeast-2.amazonaws.com/my-ecr-repository:
steps:
- label: Publish Dynamo Image
plugins:
- seek-oss/dynamodb-image#v2.0.0:
tables:
- Jobs
- Applications
repository: 123456789123.dkr.ecr.ap-southeast-2.amazonaws.com/my-ecr-repository
To run DynamoDB on a specific port when a container is run with the image, the port argument can be provided. The following example would run DynamoDB on port 8007:
steps:
- label: Publish Dynamo Image
plugins:
- seek-oss/dynamodb-image#v2.0.0:
tables:
- Jobs
- Applications
repository: 123456789123.dkr.ecr.ap-southeast-2.amazonaws.com/my-ecr-repository
port: 8007
Tagging
The plugin tags images differently depending on whether the build is on a feature branch or the main branch:
- Feature branch builds will tag the image as
branch-BUILDKITE_BUILD_NUMBER, e.g.,branch-4985for a build with build number4985 - Main branch builds will tag the image with the
latesttag
Configuration
| Argument Name | Type | Description |
|---|---|---|
repository | string (required) | The URI of the ECR repository to publish the image to. |
tables | string[] (required) | The names of the DynamoDB tables. |
port | number (optional) | The port that DynamoDB local will run on. Defaults to 8000. |
License
MIT (see LICENSE)