Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #6 from DSI-Ville-Noumea/43889
Browse files Browse the repository at this point in the history
#43889 : mettre à jour install schemacrawler
  • Loading branch information
noemienicolas authored Dec 19, 2017
2 parents 6fcdc6f + 2f30296 commit 5b79a55
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/main/resources/archetype-resources/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,15 @@ before_install:
- export schemacrawler_version=${schemacrawlerVersion}
- export JAVA_OPTS="-Xmx2560m -XX:-UseGCOverheadLimit"
- echo $JAVA_OPTS
- echo "downloading and installing liquibase ${liquibase_version}"
- wget https://github.com/liquibase/liquibase/releases/download/liquibase-parent-${liquibaseVersion}/liquibase-debian_${liquibase_version}_all.deb
- sudo dpkg -i liquibase-debian_${liquibase_version}_all.deb
- sudo ln -s /usr/lib/liquibase-${liquibase_version} /opt/liquibase
- export PATH=$PATH:/opt/liquibase
- liquibase --version
- echo "downloading and installing postgres ${postgresql_version} driver."
- wget http://central.maven.org/maven2/org/postgresql/postgresql/${postgresql_version}/postgresql-${postgresql_version}.jar
- sudo cp postgresql-${postgresql_version}.jar /opt/liquibase/lib/
- echo "downloading and installing SchemaCrawler"
- wget https://github.com/adriens/schemacrawler-deb/releases/download/${schemacrawler_version}/schemacrawler-deb_${schemacrawler_version}_all.deb
- sudo dpkg -i schemacrawler-deb_${schemacrawler_version}_all.deb
- sudo mv /opt/schemacrawler-${schemacrawler_version}/additional-lints/schemacrawler-additional-lints-*.jar /opt/schemacrawler-${schemacrawler_version}/lib
- sudo chown -R travis ./travis/pull_install_script.sh
- sudo chmod +x ./travis/pull_install_script.sh
- ./travis/pull_install_script.sh
- cd script
- ./install.sh
- echo "deploying ${appName} database."
- dropdb --if-exists ${appName}
- psql -c 'create database ${appName} ;' -U postgres
- cd ${appName}
- cd ../${appName}
- liquibase --driver=org.postgresql.Driver --username=postgres --url=jdbc:postgresql:${appName} --defaultSchemaName=public --changeLogFile=db.changelog.xml --logLevel=debug update
- cd ..
install:
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/archetype-resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ Repo dédiée aux scripts Liquibase de l'application (https://github.com/DSI-Vi
# Génération des diagrammes
schemacrawler -g=schemacrawler-diagram.config.properties

NB : penser à encrypter la clé avec botDSI : travis sshkey --generate -r DSI-Ville-Noumea/${appName} --debug --pro

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

export WORKING_DIR=`pwd`
echo "> Working dir: $WORKING_DIR"

echo "> Getting script..."
git clone [email protected]:DSI-Ville-Noumea/database-ci-script.git

echo "> Making data dir"
sudo mv database-ci-script script

echo "> Making script executable"
sudo chown -R travis ./script/install.sh
sudo chmod +x ./script/install.sh

0 comments on commit 5b79a55

Please sign in to comment.