Skip to content

seek-oss/dynamodb-image-buildkite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamoDB Image Buildkite Plugin

GitHub Release

A Buildkite plugin that introspects the schema of DynamoDB tables and then publishes multi-arch (linux/arm64 and linux/amd64) amazon/dynamodb-local images with these schemas to ECR.

Usage Requirements

For this plugin to work, you must ensure the following:

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#v1.3.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#v1.3.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-4985 for a build with build number 4985
  • Main branch builds will tag the image with the latest tag

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)