generated from replikativ/datahike-backend-template
-
-
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.
Add jdbcUrl as configuration parameter
next.jdbc can take urls via :jdbcUrl to configure your connection. For that to work it was necessary to make dbtype optional as configuration parameter and add jdbcUrl as optional configuration parameter. Now it is possible to pass the configuration partially as url and as key-value-pairs to configure the connection. - Closes #8 - Updated README - New CircleCI step for integrationtesting with postgresql and mariadb
- Loading branch information
1 parent
0d47c4b
commit 6784587
Showing
6 changed files
with
61 additions
and
148 deletions.
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 |
---|---|---|
@@ -1,129 +1,38 @@ | ||
version: 2.1 | ||
|
||
executors: | ||
leiningen: | ||
docker: | ||
- image: circleci/clojure:openjdk-8-lein-2.9.3 | ||
environment: | ||
LEIN_ROOT: nbd | ||
JVM_OPTS: -Xmx3200m | ||
working_directory: /home/circleci/datahike-jdbc | ||
|
||
jobs: | ||
setup: | ||
executor: leiningen | ||
steps: | ||
- restore_cache: | ||
keys: | ||
- source-{{ .Branch }}-{{ .Revision }} | ||
- source-{{ .Branch }} | ||
- source- | ||
- checkout | ||
- save_cache: | ||
key: source-{{ .Branch }}-{{ .Revision }} | ||
paths: | ||
- .git | ||
- restore_cache: | ||
keys: | ||
- deps-{{ checksum "project.clj" }} | ||
- deps- | ||
- run: lein deps | ||
- save_cache: | ||
key: deps-{{ checksum "project.clj" }} | ||
paths: | ||
- /home/circleci/.m2 | ||
- /home/circleci/.lein | ||
- persist_to_workspace: | ||
root: /home/circleci/ | ||
paths: | ||
- .m2 | ||
- datahike-jdbc | ||
- bin | ||
|
||
integrationtest: | ||
executor: leiningen | ||
docker: | ||
- image: circleci/clojure:openjdk-8-lein-2.9.3 | ||
- image: circleci/postgres:11-alpine | ||
environment: | ||
POSTGRES_USER: alice | ||
POSTGRES_PASSWORD: foo | ||
POSTGRES_DB: config-test | ||
- image: circleci/mariadb:10.4 | ||
environment: | ||
MYSQL_USER: alice | ||
MYSQL_PASSWORD: foo | ||
MYSQL_DATABASE: config-test | ||
MYSQL_RANDOM_ROOT_PASSWORD: true | ||
steps: | ||
- attach_workspace: | ||
at: /home/circleci | ||
- run: | ||
name: Run Integrationtests | ||
command: lein test | ||
no_output_timeout: 5m | ||
|
||
build: | ||
executor: leiningen | ||
steps: | ||
- attach_workspace: | ||
at: /home/circleci | ||
- run: | ||
name: Build | ||
command: lein uberjar | ||
no_output_timeout: 5m | ||
|
||
deploy-snapshot: | ||
executor: leiningen | ||
steps: | ||
- attach_workspace: | ||
at: /home/circleci | ||
- run: | ||
command: | | ||
VERSION=$(head -n 1 project.clj | awk '{print $3}' | tr -d \") | ||
if [[ ${VERSION} =~ .*-SNAPSHOT ]]; then | ||
lein deploy clojars | ||
else | ||
exit 0 | ||
fi | ||
deploy-release: | ||
executor: leiningen | ||
steps: | ||
- attach_workspace: | ||
at: /home/circleci | ||
- run: | ||
name: Deploy Release to Clojars | ||
command: | | ||
VERSION=$(head -n 1 project.clj | awk '{print $3}' | tr -d \") | ||
if [[ ${VERSION} =~ .*-SNAPSHOT ]]; then | ||
exit 0 | ||
else | ||
lein deploy clojars | ||
fi | ||
orbs: | ||
lein: replikativ/clj-lein@0 | ||
|
||
workflows: | ||
build_and_test: | ||
build-test-and-deploy: | ||
jobs: | ||
- setup | ||
- integrationtest: | ||
- lein/setup | ||
- lein/format: | ||
requires: | ||
- lein/setup | ||
- lein/integrationtest-postgresql-mariadb: | ||
requires: | ||
- setup | ||
- build: | ||
- lein/setup | ||
- lein/build: | ||
requires: | ||
- setup | ||
- deploy-snapshot: | ||
- lein/setup | ||
- lein/deploy-snapshot: | ||
context: clojars-deploy | ||
filters: | ||
branches: | ||
only: development | ||
requires: | ||
- setup | ||
- integrationtest | ||
- build | ||
- deploy-release: | ||
- lein/setup | ||
- lein/format | ||
- lein/build | ||
- lein/integrationtest-postgresql-mariadb | ||
- lein/deploy-release: | ||
context: clojars-deploy | ||
filters: | ||
branches: | ||
only: master | ||
requires: | ||
- setup | ||
- integrationtest | ||
- build | ||
- lein/setup | ||
- lein/format | ||
- lein/build | ||
- lein/integrationtest-postgresql-mariadb |
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 |
---|---|---|
|
@@ -13,3 +13,4 @@ pom.xml.asc | |
.nrepl-port | ||
.cpcache/ | ||
temp/ | ||
datahike.mv.db |
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
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