-
Notifications
You must be signed in to change notification settings - Fork 4
/
buildspec.yml
34 lines (34 loc) · 1.09 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
version: 0.2
phases:
install:
runtime-versions:
java: openjdk8
python: 3.7
commands:
- pip install --upgrade 'six==1.15.0'
- pip install --upgrade 'docker~=4.0'
- pip install --upgrade 'aws-sam-translator==1.22.0'
- pip install --upgrade 'pyyaml<6.0'
- pip install pre-commit cloudformation-cli-java-plugin
build:
commands:
- pre-commit run --all-files
- |
if [[ $(ls -A $CODEBUILD_SRC_DIR) ]]; then
cd $CODEBUILD_SRC_DIR
# skip hidden folders
dirs=$(find . -not -path "\./\.*" -mindepth 1 -maxdepth 1 -type d)
echo "Folders to build: $dirs"
for directory in $dirs; do
cd "$directory"
mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean verify --no-transfer-progress
if [ "$?" -ne 0 ] ; then
echo "Build failed!"
exit 1
else
cd ".."
fi
done
else
echo "$CODEBUILD_SRC_DIR is empty"
fi