Skip to main content

AWS CodeBuild

The following code sample demonstrates how to integrate Dagger with AWS CodeBuild.

buildspec.yml
version: 0.2

env:
secrets-manager:
# assumes that the Dagger Cloud token is
# in a secret with key dagger_cloud_token
# set in AWS Secrets Manager
DAGGER_CLOUD_TOKEN: "arn:aws:secretsmanager:...:dagger_cloud_token"

phases:
pre_build:
commands:
- echo "Installing Dagger CLI"
- curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh

# assumes a Go project
# modify to use different function(s) as needed
build:
commands:
- echo "Calling Dagger Function"
- dagger -m github.com/kpenfound/dagger-modules/golang@v0.1.5 call build --project=. --args=.