-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
49 lines (43 loc) · 1.12 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
version: 0.2
phases:
install:
runtime-versions:
python: 3.7
golang: 1.13
commands:
- pip install -U 'six~=1.15'
- pip install -U 'pyyaml~=5.4'
- pip install -U pre-commit cloudformation-cli-go-plugin
build:
commands:
- pre-commit run --all-files
- |
if [ "$(ls -A $CODEBUILD_SRC_DIR)" ]; then
cd $CODEBUILD_SRC_DIR
for directory in aws-aps-workspace; do
cd "$directory"
cfn generate
if [ "$?" -ne 0 ] ; then
echo "cfn generate failed!"
exit 1
fi
go get ./...
if [ "$?" -ne 0 ] ; then
echo "go get failed!"
exit 1
fi
go test ./...
if [ "$?" -ne 0 ] ; then
echo "go test failed!"
exit 1
fi
make -f makebuild build
if [ "$?" -ne 0 ] ; then
echo "go build failed!"
exit 1
fi
cd ..
done
else
echo "$CODEBUILD_SRC_DIR is empty"
fi