This sample creates a CodePipeline pipeline that builds the fzf project and publishes the compiled binary to S3.
You must set CODEPIPELINE_GH_TOKEN
environment config option to the PAT token. GitHub requires this to download even public repositories.
Start LocalStack using any supported method, or:
docker run \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "./volume:/var/lib/localstack" \
-e DEBUG=1 \
-p 4566:4566 \
-p 4510-4559:4510-4559 \
-e DOCKER_HOST=unix:///var/run/docker.sock \
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN} \
-e CODEPIPELINE_GH_TOKEN=${CODEPIPELINE_GH_TOKEN} \
localstack/localstack-pro:latest
Run the following script which will create all prerequisite resource and the pipeline. It will also download the compiled binary from the S3 bucket and execute it.
bash run.sh
The pipeline is structured as follows:
flowchart LR
A("CodeStarSourceConnection: Download source code")
A --> B("CodeBuild: Compile")
B --> C("S3: Upload binary")