-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdelivery.yaml
47 lines (42 loc) · 1.32 KB
/
delivery.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: '2017-09-20'
dependencies:
- id: java
type: docker
ref: container-registry.zalando.net/library/eclipse-temurin-8-jdk
pipeline:
- id: build
env:
LEIN_ROOT: true
type: script
vm_config:
type: linux
image: "cdp-runtime/jdk8-clojure"
artifacts:
- type: docs
name: automata-databases
path: schema
commands:
- desc: Run unit tests
cmd: |
docker run -d -p 5432:5432 postgres:12.1
lein test
- desc: Build and push docker image
cmd: |
lein do clean, uberjar
IMAGE="pierone.stups.zalan.do/automata/kio:${CDP_BUILD_VERSION}"
docker build -t "$IMAGE" .
if [ -z "$CDP_PULL_REQUEST_NUMBER" ]; then
docker push "$IMAGE"
fi
TEST_IMAGE="pierone.stups.zalan.do/automata/kio-test:${CDP_BUILD_VERSION}"
docker tag "$IMAGE" "$TEST_IMAGE"
docker push "$TEST_IMAGE"
- desc: Generate database docs
cmd: |
mkdir schema
if [ -z "$CDP_PULL_REQUEST_NUMBER" ]; then
DOCS_PATH=schema/kio
wget https://github.com/schemaspy/schemaspy/releases/download/v6.0.0/schemaspy-6.0.0.jar -O schema.jar
wget https://jdbc.postgresql.org/download/postgresql-42.2.4.jar
java -jar schema.jar -t pgsql -s zk_data -db postgres -u postgres -host localhost -o $DOCS_PATH -dp postgresql-42.2.4.jar -noads
fi