forked from aws/sagemaker-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
35 lines (30 loc) · 1.14 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: 0.2
phases:
pre_build:
commands:
- start-dockerd
build:
commands:
- IGNORE_COVERAGE=-
# run integration tests
- start_time=`date +%s`
- |
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
python3 -u ci-scripts/queue_build.py
fi
- ./ci-scripts/displaytime.sh 'build queue' $start_time
- start_time=`date +%s`
- |
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
tox -e py36 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50 --boto-config '{"region_name": "us-east-2"}'
fi
- ./ci-scripts/displaytime.sh 'py36 tests/integ' $start_time
post_build:
finally:
- |
if [ -d "ci-lock" ]; then
FILENAME=$(ls ci-lock/ || true)
ACCOUNT=$(aws --endpoint-url https://sts.us-west-2.amazonaws.com sts get-caller-identity --region us-west-2 --output text | awk '{print $1}')
S3_BUCKET_DIR=s3://sagemaker-us-west-2-${ACCOUNT}/ci-lock/
aws s3 rm ${S3_BUCKET_DIR}${FILENAME}
fi