-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial continuous integration setup (#1)
- Loading branch information
1 parent
1c05c1d
commit 010b5d8
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: | ||
- --fix=lf | ||
- id: trailing-whitespace | ||
- id: pretty-format-json | ||
args: | ||
- --autofix | ||
- --indent=2 | ||
- --no-sort-keys | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
exclude: codebuild-ci.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 0.2 | ||
phases: | ||
install: | ||
runtime-versions: | ||
java: openjdk8 | ||
python: 3.7 | ||
commands: | ||
- 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 |