-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildspec.yml
71 lines (61 loc) · 2.08 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: 0.2
phases:
pre_build:
commands:
- start-dockerd
# fix permissions dropped by CodePipeline
- chmod +x ./scripts/*.sh
- chmod +x ./docker/build_artifacts/sagemaker/serve
build:
commands:
# prepare the release (update versions, changelog etc.)
- if is-release-build; then git-release --prepare; fi
- tox -e jshint,flake8,pylint
# build images
- ./scripts/build-all.sh
# run local tests
- tox -e py37 -- test/integration/local --framework-version 2.1
# push docker images to ECR
- |
if is-release-build; then
./scripts/publish-all.sh
fi
# run SageMaker tests
- |
if is-release-build; then
tox -e py37 -- -n 8 test/integration/sagemaker/test_tfs.py --versions 2.1.0
fi
# write deployment details to file
# todo sort out eia versioning
# todo add non-eia tests
- |
if is-release-build; then
echo '[{
"repository": "sagemaker-tensorflow-serving",
"tags": [{
"source": "1.15.0-cpu",
"dest": ["1.15.0-cpu", "1.15-cpu", "1.15.0-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
},{
"source": "1.15.0-gpu",
"dest": ["1.15.0-gpu", "1.15-gpu", "1.15.0-gpu-'${CODEBUILD_BUILD_ID#*:}'"]
}],
"test": [
"tox -e py37 -- -n 8 test/integration/sagemaker/test_tfs.py::test_tfs_model --versions 1.15.0 --region {region} --registry {aws-id}"
]
}, {
"repository": "sagemaker-tensorflow-serving-eia",
"tags": [{
"source": "1.14-cpu",
"dest": ["1.14.0-cpu", "1.14-cpu", "1.14.0-cpu-'${CODEBUILD_BUILD_ID#*:}'"]
}],
"test": [
"tox -e py37 -- test/integration/sagemaker/test_ei.py -n 8 --versions 1.14 --region {region} --registry {aws-id}"
]
}]' > deployments.json
fi
# publish the release to github
- if is-release-build; then git-release --publish; fi
artifacts:
files:
- deployments.json
name: ARTIFACT_1