Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 5c419fe

Browse files
committed
updating the buildspec to include ecr scanning command
1 parent d09e3d4 commit 5c419fe

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

ci/buildspec.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
version: 0.2
2-
2+
env:
3+
variables:
4+
DLC_IMAGES: "515193369038.dkr.ecr.us-west-2.amazonaws.com/sagemaker-sparkml-serving:3.3"
5+
IS_GENERIC_IMAGE: "True"
6+
CODEBUILD_RESOLVED_SOURCE_VERSION: "sparkml-v33"
37
phases:
8+
install:
9+
runtime-versions:
10+
python: latest
11+
commands:
12+
- pip3 install pytest
13+
- pip3 install -r $CODEBUILD_SRC_DIR_Source2/src/requirements.txt
14+
- pip3 install -r $CODEBUILD_SRC_DIR_Source2/test/requirements.txt
415
pre_build:
516
commands:
617
- echo Logging in to Amazon ECR...
@@ -9,11 +20,15 @@ phases:
920
commands:
1021
- echo Build started on `date`
1122
- echo Building the Docker image...
12-
- ls
1323
- docker build -t sagemaker-sparkml-serving:3.3 .
14-
- docker tag sagemaker-sparkml-serving:3.3 515193369038.dkr.ecr.us-west-2.amazonaws.com/sagemaker-sparkml-serving:3.3
24+
- docker tag sagemaker-sparkml-serving:3.3 $DLC_IMAGES
1525
post_build:
1626
commands:
1727
- echo Build completed on `date`
1828
- echo Pushing the Docker image...
19-
- docker push 515193369038.dkr.ecr.us-west-2.amazonaws.com/sagemaker-sparkml-serving:3.3
29+
- echo $CODEBUILD_RESOLVED_SOURCE_VERSION
30+
- docker push $DLC_IMAGES
31+
- cd $CODEBUILD_SRC_DIR_Source2
32+
- export PYTHONPATH=$(pwd)/src
33+
- cd test/dlc_tests
34+
- pytest -s sanity/test_ecr_scan.py::test_ecr_enhanced_scan

0 commit comments

Comments
 (0)