Skip to content

Commit 4cc1b7e

Browse files
committed
Fix buildspec to push final image on PR merge
1 parent 74466b4 commit 4cc1b7e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ci/buildspec.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ phases:
4444
- echo Pushing the Docker image...
4545
- |
4646
case $CODEBUILD_WEBHOOK_EVENT in
47-
PUSH)
47+
PUSH | PULL_REQUEST_MERGED)
48+
echo Pushing final image..
4849
docker push 515193369038.dkr.ecr.us-west-2.amazonaws.com/sagemaker-scikit-learn:$FRAMEWORK_VERSION-cpu-py3 | grep -v -E "[0-9]{12}.dkr.ecr.\S+.amazonaws.com"
4950
;;
50-
PULL_REQUEST_MERGED | PULL_REQUEST_CREATED | PULL_REQUEST_UPDATED | PULL_REQUEST_REOPENED)
51+
PULL_REQUEST_CREATED | PULL_REQUEST_UPDATED | PULL_REQUEST_REOPENED)
5152
# pushes test tag for manual verification, requires cleanup in ECR every once in a while though
5253
TEST_TAG=515193369038.dkr.ecr.us-west-2.amazonaws.com/sagemaker-scikit-learn:$FRAMEWORK_VERSION-cpu-py3-test
5354
docker tag preprod-sklearn:$FRAMEWORK_VERSION-cpu-py3 ${TEST_TAG}
55+
echo Pushing test image..
5456
docker push ${TEST_TAG} | grep -v -E "[0-9]{12}.dkr.ecr.\S+.amazonaws.com"
5557
;;
5658
*)

0 commit comments

Comments
 (0)