Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.99 KB

README.md

File metadata and controls

38 lines (25 loc) · 1.99 KB

LocalStack CodePipeline Samples

This repository contains two sample applications that demonstrate LocalStack's CodePipeline emulation with CodeBuild, S3, and CodeArtifact workflows.

Prerequisites

  • A valid LocalStack for AWS license, which provides a LOCALSTACK_AUTH_TOKEN required to run these samples.
  • Docker with access to the Docker socket.
  • lstk CLI and AWS CLI, required by lstk aws.
  • A GitHub Personal Access Token exported as CODEPIPELINE_GH_TOKEN (used by both samples to download source archives).
  • npm (required for the CodeArtifact publishing sample).
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
export CODEPIPELINE_GH_TOKEN=<your-github-pat>

If you start LocalStack with lstk start, export the token as LOCALSTACK_CODEPIPELINE_GH_TOKEN instead. lstk only forwards LOCALSTACK_-prefixed variables to the container, which strips the prefix.

Each run.sh fails if the pipeline execution fails or takes longer than MAX_WAIT_SECONDS (default 1800).

Pull the CodeBuild images before the first run:

docker pull public.ecr.aws/codebuild/amazonlinux-x86_64-standard:5.0
docker pull localstack/aws-codebuild-local:2

LocalStack stops tracking a build if its image is still downloading a few seconds after the build starts, and the pipeline then stays InProgress.

Samples

License

Licensed under the Apache License 2.0. See LICENSE.