Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .trigger
Empty file.
2 changes: 2 additions & 0 deletions ci/codebuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM scratch
ADD sample_artifact .
1 change: 1 addition & 0 deletions ci/codebuild/sample_artifact
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the built artifact
19 changes: 19 additions & 0 deletions ci/codebuild/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 0.2

phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com
build:
commands:
- echo Build started on `date`
- export DOCKER_IMAGE_NAME="$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:${CODEBUILD_WEBHOOK_TRIGGER//\//-}"
- echo Image name is $DOCKER_IMAGE_NAME
- cd $CODEBUILD_SRC_DIR/ci/codebuild
- docker build -t $DOCKER_IMAGE_NAME .
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker image
- docker push $DOCKER_IMAGE_NAME