Skip to content

Commit

Permalink
Add Schemaspy (#16)
Browse files Browse the repository at this point in the history
Add schemaspy
  • Loading branch information
cleborys authored Feb 7, 2021
1 parent 6556d1e commit e289336
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ script:

after_success:
- coveralls
- ./ci/schemaspy.sh

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_PAGES_TOKEN
keep_history: false
on:
branch: develop
local_dir: ./public
8 changes: 8 additions & 0 deletions ci/schemaspy.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schemaspy.t=mysql
schemaspy.host=faf-db
schemaspy.port=3306
schemaspy.db=faf-league
schemaspy.u=root
schemaspy.p=banana
schemaspy.outputDirectory=/output
schemaspy.s=faf-league
21 changes: 21 additions & 0 deletions ci/schemaspy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -e

echo 'travis_fold:start:schemaspy'

echo '# Generating db diagram with Schemaspy'

SCHEMASPY_OUTPUT_DIR=$PWD/public

cat "$PWD/ci/schemaspy.properties"

mkdir -p "${SCHEMASPY_OUTPUT_DIR}"
chmod a+rw "${SCHEMASPY_OUTPUT_DIR}"

docker run --network="faf" \
-v "$PWD/ci/schemaspy.properties:/schemaspy.properties" \
-v "${SCHEMASPY_OUTPUT_DIR}:/output" \
schemaspy/schemaspy:latest \
|| { echo "Could not generate schema"; exit 1; }

echo 'travis_fold:end:schemaspy'

0 comments on commit e289336

Please sign in to comment.