File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -27,4 +27,18 @@ phases:
27
27
commands :
28
28
- echo Build completed on `date`
29
29
- echo Pushing the Docker image...
30
- - docker push 515193369038.dkr.ecr.us-west-2.amazonaws.com/sagemaker-scikit-learn:$FRAMEWORK_VERSION-cpu-py3
30
+ - |
31
+ case $CODEBUILD_WEBHOOK_EVENT in
32
+ PULL_REQUEST_MERGED)
33
+ 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"
34
+ ;;
35
+ PULL_REQUEST_CREATED | PULL_REQUEST_UPDATED | PULL_REQUEST_REOPENED)
36
+ # pushes test tag for manual verification, requires cleanup in ECR every once in a while though
37
+ TEST_TAG=515193369038.dkr.ecr.us-west-2.amazonaws.com/sagemaker-scikit-learn:$FRAMEWORK_VERSION-cpu-py3-test
38
+ docker tag preprod-sklearn:$FRAMEWORK_VERSION-cpu-py3 ${TEST_TAG}
39
+ docker push ${TEST_TAG} | grep -v -E "[0-9]{12}.dkr.ecr.\S+.amazonaws.com"
40
+ ;;
41
+ *)
42
+ echo Undefined behavior for webhook event type $CODEBUILD_WEBHOOK_EVENT
43
+ ;;
44
+ esac
You can’t perform that action at this time.
0 commit comments