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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
barmi83 committed May 3, 2018
2 parents 78c81b7 + 5b79a55 commit 9be3dd9
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 18 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sudo: required
language: java
cache:
directories:
- .autoconf
- $HOME/.m2
jdk:
- oraclejdk8
services: postgresql
addons:
postgresql: 9.4
notifications:
slack:
secure: X6r7K2ZYiH743A7cQioqo2G5Q39gxj/sGK8NgrgAUOnXogfGa+dpscXsQguDoD18Aq2hQ8uZN96W5HxCJmJH4otpcIt2JRbkdm3DkCCA/fqEq/+sZDPparProz+5jxZGV1XCw81sKjt92Raff/w416B+VI8n1wFUhVb8jBZt5X/MzmL/qrqvrOlMW9j3Nr8VTZUYK3EehKLo0SjMPYYurk++zAKK5y3qgDTSQW03JLHn7Q/DSIMO5FzmCHjIUhkE7j7TUdGTFqW7HCtGdDnrAVSb0ETeOmlD4DqhsIxI5lBgvo2J8r/1Eaz2A/VSessHgvDSJErQbXJsPVEPsOmGkGXTUilX2uhlwBxgfB74xmQr/ycCEWUontXAs3qY3eFOC1/yKlfntNbmnF2+/rqLA9qvAfOPS9mkcdK+xACaEJV88qhb+miVj94GraBdps4fIS3pkqi3wSdP0eldJ1AxMZEARIV+//nEGJekoRQM3en8M7Gz/OCD+YMZ1kHA0EDSwSa/NPFTr3sXTxHP10maO0gWTAckjKY5RGwZFD9M9JUFzjuMuAn37BjmmgNdyjDPJbQk1yMDFmXSEAUwKE0roTKQ9x/cBAeNrpNDk1vt/1MrHIIHoAlNXLJFjvJVs0tyemt9HGw8yRTyQLqCkVSwKLQME25Y6jGOTIHWEFKIc0g=

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/DSI-Ville-Noumea/liquibase-archetype.svg?branch=master)](https://travis-ci.org/DSI-Ville-Noumea/liquibase-archetype)

# liquibase-archetype

Archetype maven pour projet liquibase
Expand All @@ -14,7 +16,7 @@ Archetype maven pour projet liquibase

```
>> cd ..
>> mvn archetype:generate -DarchetypeArtifactId=liquibase-archetype -DarchetypeGroupId=nc.noumea.mairie -DarchetypeVersion=1.00.00 -DappName=myApp
>> mvn archetype:generate -DarchetypeArtifactId=liquibase-archetype -DarchetypeGroupId=nc.noumea.mairie -DarchetypeVersion=3.00.00 -DappName=myApp -DarchetypeCatalog=local
```


Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/maven/archetype-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<defaultValue>3.5.3</defaultValue>
</requiredProperty>
<requiredProperty key="schemacrawlerVersion">
<defaultValue>14.15.03</defaultValue>
<defaultValue>14.15.04</defaultValue>
</requiredProperty>
<requiredProperty key="postgresDriverVersion">
<defaultValue>42.0.0</defaultValue>
Expand Down
24 changes: 8 additions & 16 deletions src/main/resources/archetype-resources/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ sudo: required
language: java
cache:
directories:
- .autoconf
- $HOME/.m2
- ".autoconf"
- "$HOME/.m2"
jdk:
- oraclejdk8
services: postgresql
Expand All @@ -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-${liquibase_version}/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 9be3dd9

Please sign in to comment.