Skip to content
Snippets Groups Projects
Commit 1277b08e authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch 'dev' into 283-multi-column-foreign-key-unique-and-check-constraint-support

parents bcc502cd 1030d786
No related branches found
No related tags found
2 merge requests!163Relase 1.3.0,!139Implementation of multi-column foreign key, unique and check constraint support
Showing
with 237 additions and 559 deletions
#!/bin/bash
# set version
TAG=latest
# tear everything down
echo "Removing all data ..."
/bin/bash teardown
docker system prune -f --volumes || true
echo "Pulling new images ..."
docker pull "dbrepo/analyse-service:${TAG}"
docker pull "dbrepo/authentication-service:${TAG}"
docker pull "dbrepo/metadata-db:${TAG}"
docker pull "dbrepo/ui:${TAG}"
docker pull "dbrepo/ui-proxy:${TAG}"
docker pull "dbrepo/identifier-service:${TAG}"
docker pull "dbrepo/container-service:${TAG}"
docker pull "dbrepo/database-service:${TAG}"
docker pull "dbrepo/discovery-service:${TAG}"
docker pull "dbrepo/gateway-service:${TAG}"
docker pull "dbrepo/query-service:${TAG}"
docker pull "dbrepo/table-service:${TAG}"
docker pull "dbrepo/units-service:${TAG}"
docker pull "dbrepo/broker-service:${TAG}"
docker pull "dbrepo/metadata-service:${TAG}"
echo "Pulled new images"
# deploy dbrepo
echo "Deploy DBRepo ..."
docker compose -f ./docker-compose.dbrepo2.yml up -d
# clone tuw specific deployment
git -C "/home/demo/dbrepo-tuw" pull || git clone ssh://git@gitlab.tuwien.ac.at:822/martin.weise/dbrepo-tuw.git "/home/demo/dbrepo-tuw"
cd /home/demo/dbrepo-tuw && git checkout dev
# build tuw specific deployment
docker compose -f /home/demo/dbrepo-tuw/docker-compose.dbrepo2.yml build || exit 3
docker compose -f /home/demo/dbrepo-tuw/docker-compose.dbrepo2.yml up -d || exit 4
echo "Deployed TU Wien specific deployment"
\ No newline at end of file
gitlab.tuwien.ac.at ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKslN24njaMeH0xyVBO/lzeQ5/X/6UFkiz2qdcWihjT28slO/6pFBAxSzPUTBeVJWxKJgX9N+Hm65S9/Z2521E8Y9F56dcrOgeQBZ4GbLPSbEZIFN/71VL4cOh6tLahNZsAwd6y2Zi5XTAqho31VWfdCZkegZB3dNzLfOuC0t3KpxEAmWus5j8InNYDTBIy6U351/3h3oy32EdLvLpaHP+oy+QFAqXOlcXlKwHTfv9SSchQRLfWzrL4hVvohbCwMDBBvIP8J0WQ9mV95xfcwuipMWP3TksDGbst2MQ6HRXZ+yfie9Vgzg+++AjpHXQCMdalEmedNxCmxbHWYJxFHUV
gitlab.tuwien.ac.at ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC+2QClFaM3ZNQ6nl3nHkZdFSyNP26uHPzJEUBu9J4yC1ON9GPHb2P3rC//wS819e3LWP4PXb8ug/EyEjWN30MA=
gitlab.tuwien.ac.at ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILTzOKU3zEYNo1xy8rxZsa8D0/y4EN4oB0E7wgWCkOpZ
dbrepo2.ec.tuwien.ac.at ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC5GFfX4xmYeQdQQL81heBjKb4d1M8xjOjF4lpfNmc3/wyCPtP/dt4r3nkcOW3X14yPximy8BlArsPk4ul14BWNI9yrU5VA1FLlWq9Og6SfMJ1EAUNsePDd3qCpr/ljlydS3kWCVrXD1bNO0kQ3/36e9l64BDvZXyhI3n9DvkPO93n9xJ151IC9IwjnSzJQPghboUDRiYwT2B9wt+uC+k7tTV5tQH5kJk8fEa8nMyHOc8aD2miHubrcQJrYO/fv+vVxVWJKtSdz22wuvFnj8SfGClxbT8cfMo8X+LpIQOH8VYwIZVznuSlnNYOOYO6EGYyRnqud6oz0B5RUbwyeBhtAgZW1C1OXO9DVDLnazzFxJIzwhwyZCPurpLpP7bd6P+oFWy1A7bxIhfvdduEDE80vEOPrBl44TDe6RJR6QILtdUn9rrvcV/kgfj04zkQJjqMvX2pdCpdMIU1Pm+NQ53k3oOap7j9UHnpWX7C3mk76ueQddQxWZUhGsrFUAYSJfus=
dbrepo2.ec.tuwien.ac.at ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOGTeKw2aKnykIUmvLiBNaGbq3xlSEsnD1M1HiZsPJ9ZtfSV12y9F0yutV4j68Rb+eHbyOxoyVekfl19ODDvXLM=
dbrepo2.ec.tuwien.ac.at ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpSoshRRtQBj4ebWeaWoeGr1XFIlx3L+BXV69fafBGr
\ No newline at end of file
#!/bin/bash
docker container stop $(docker container ls -aq) || true
docker container rm $(docker container ls -aq) || true
docker volume rm $(docker volume ls -q) || true
#!/bin/bash
FILES=$(cd /tmp && find -exec basename '{}' ';' 2>/dev/null | egrep '^.{32}$' | egrep "^([a-z0-9]+)$")
for file in $FILES; do
rm -f /tmp/$file
echo "Removed /tmp/${file}"
done
\ No newline at end of file
0 2 * * * /usr/bin/make -C /home/rocky/fda-services teardown
1 2 * * * /usr/bin/make -C /home/rocky/fda-services run
\ No newline at end of file
#!/bin/bash
TMP_CERT_LOCATION="/root/keys"
TMP_SAML_LOCATION="/root/keys"
KEY_STORE_LOCATION="/tmp/dbrepo.jks"
KEY_STORE_PASS="dbrepo"
CERT_LOCATION="/etc/letsencrypt/live/dbrepo.ossdip.at"
SAML_KEY="/root/keys/saml_sign.key"
SAML_PUB="/root/keys/saml_sign.cer"
TU_SAML_CERT="./fda-authentication-service/rest-service/src/main/resources/saml/tu.crt"
# PLACE
sudo mkdir -p "${TMP_CERT_LOCATION}"
sudo mkdir -p "${TMP_SAML_LOCATION}"
# REQUEST
sudo certbot certonly --standalone --preferred-challenges http -d dbrepo.ossdip.at \
-m martin.weise@tuwien.ac.at --agree-tos --keep-until-expiring
# CONVERT PKCS12
sudo openssl pkcs12 -export -out "${TMP_SAML_LOCATION}/saml.p12" -in "${SAML_PUB}" \
-inkey "${SAML_KEY}" -passout "pass:${KEY_STORE_PASS}"
# CONVERT PKCS12
sudo openssl pkcs12 -export -out "${TMP_CERT_LOCATION}/cert.p12" -in "${CERT_LOCATION}/cert.pem" \
-inkey "${CERT_LOCATION}/privkey.pem" -passout "pass:${KEY_STORE_PASS}"
# FIX PERMISSIONS
sudo chmod -R 644 "${TMP_CERT_LOCATION}"
sudo chmod -R 644 "${TMP_SAML_LOCATION}"
# IMPORT SSL SIGN PRIVKEY
sudo keytool -noprompt -importkeystore -deststorepass "${KEY_STORE_PASS}" -destkeypass "${KEY_STORE_PASS}" \
-destkeystore "${KEY_STORE_LOCATION}" -srckeystore "${TMP_CERT_LOCATION}/cert.p12" -srcstoretype PKCS12 \
-srcstorepass "${KEY_STORE_PASS}" -alias 1 -destalias ssl
# IMPORT SAML MESSAGE SIGN PRIVKEY
sudo keytool -noprompt -importkeystore -deststorepass "${KEY_STORE_PASS}" -destkeypass "${KEY_STORE_PASS}" \
-destkeystore "${KEY_STORE_LOCATION}" -srckeystore "${TMP_SAML_LOCATION}" -srcstoretype PKCS12 \
-srcstorepass "${KEY_STORE_PASS}" -alias 1 -destalias saml
# IMPORT METADATA VERIFICATION PUBKEY
sudo keytool -noprompt -importcert -file "${TU_SAML_CERT}" -storepass "${KEY_STORE_PASS}" \
-keystore "${KEY_STORE_LOCATION}" -alias tu
# OWNERSHIP
sudo chown centos:docker "${TMP_CERT_LOCATION}"
sudo chown centos:docker "${TMP_SAML_LOCATION}"
sudo chown centos:docker "${KEY_STORE_LOCATION}"
# TRUST LET'S ENCRYPT
sudo keytool -noprompt -import -alias letsencrypt -keystore "${KEY_STORE_LOCATION}" -storepass "${KEY_STORE_PASS}" \
-file "${CERT_LOCATION}/chain.pem"
#!/bin/bash
sudo cat /root/smtp.secret >> ./.env
#!/bin/bash
CA_PATH="/etc/letsencrypt/live/dbrepo.ossdip.at"
sudo certbot certonly --standalone --preferred-challenges http -d dbrepo.ossdip.at --agree-tos --keep-until-expiring
KEY=$(sudo sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g' "${CA_PATH}/privkey.pem")
CERT=$(sudo sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g' "${CA_PATH}/cert.pem")
cat << EOF
UI_KEY="${KEY}"
UI_CERT="${CERT}"
EOF
\ No newline at end of file
# FDA USERDB
172.28.0.2 fda-userdb-weather-aus
172.28.0.3 fda-userdb-infection
172.28.0.4 fda-userdb-air
172.28.0.5 fda-userdb-u01
172.28.0.6 fda-userdb-u02
172.28.0.7 fda-userdb-u03
\ No newline at end of file
...@@ -3,10 +3,11 @@ target/ ...@@ -3,10 +3,11 @@ target/
!.mvn/wrapper/maven-wrapper.jar !.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/ !**/src/main/**/target/
!**/src/test/**/target/ !**/src/test/**/target/
dbrepo-*
# Notebooks # Notebooks
.jupyter/ .jupyter/
.pytest_cache/ .pytest_cache/
__pycache__/
# demo # demo
.demo .demo
......
...@@ -5,7 +5,6 @@ before_script: ...@@ -5,7 +5,6 @@ before_script:
- "mvn --version" - "mvn --version"
- "python3 --version" - "python3 --version"
- "df / -h" - "df / -h"
- "grep -rnw '@Test' | wc -l"
variables: variables:
HOSTALIASES: ./hosts HOSTALIASES: ./hosts
...@@ -23,76 +22,77 @@ stages: ...@@ -23,76 +22,77 @@ stages:
- build-backend - build-backend
- build-frontend - build-frontend
- test-backend - test-backend
- test-frontend
- build-docker - build-docker
- release - release
build-backend-metadata-db: build-metadata-db:
stage: build-backend stage: build-backend
script: script:
- "make build-backend-metadata-db" - "make build-metadata-db"
build-backend-authentication: build-authentication-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-authentication" - "make build-authentication-service"
build-backend-identifier: build-identifier-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-identifier" - "make build-identifier-service"
build-backend-container: build-container-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-container" - "make build-container-service"
build-backend-database: build-database-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-database" - "make build-database-service"
build-backend-discovery: build-discovery-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-discovery" - "make build-discovery-service"
build-backend-gateway: build-gateway-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-gateway" - "make build-gateway-service"
build-backend-query: build-query-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-query" - "make build-query-service"
build-backend-table: build-table-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-table" - "make build-table-service"
build-backend-metadata: build-metadata-service:
stage: build-backend stage: build-backend
needs: needs:
- build-backend-metadata-db - build-metadata-db
script: script:
- "make build-backend-metadata" - "make build-metadata-service"
build-semantics-service: build-semantics-service:
stage: build-backend stage: build-backend
...@@ -107,7 +107,7 @@ build-analyse-service: ...@@ -107,7 +107,7 @@ build-analyse-service:
test-backend-authentication: test-backend-authentication:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-authentication - build-authentication-service
script: script:
- "make test-authentication-service" - "make test-authentication-service"
- "cat ./fda-authentication-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-authentication-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -120,10 +120,11 @@ test-backend-authentication: ...@@ -120,10 +120,11 @@ test-backend-authentication:
reports: reports:
junit: ./fda-authentication-service/rest-service/target/surefire-reports/TEST-*.xml junit: ./fda-authentication-service/rest-service/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
test-backend-identifier:
test-identifier-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-authentication - build-authentication-service
script: script:
- "make test-identifier-service" - "make test-identifier-service"
- "cat ./fda-identifier-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-identifier-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -137,10 +138,10 @@ test-backend-identifier: ...@@ -137,10 +138,10 @@ test-backend-identifier:
junit: ./fda-identifier-service/rest-service/target/surefire-reports/TEST-*.xml junit: ./fda-identifier-service/rest-service/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
test-backend-container: test-container-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-container - build-container-service
script: script:
- "make test-container-service" - "make test-container-service"
- "cat ./fda-container-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-container-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -154,10 +155,10 @@ test-backend-container: ...@@ -154,10 +155,10 @@ test-backend-container:
junit: ./fda-container-service/rest-service/target/surefire-reports/TEST-*.xml junit: ./fda-container-service/rest-service/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
test-backend-database: test-database-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-database - build-database-service
script: script:
- "docker pull elasticsearch:7.13.4" - "docker pull elasticsearch:7.13.4"
- "make test-database-service" - "make test-database-service"
...@@ -171,11 +172,12 @@ test-backend-database: ...@@ -171,11 +172,12 @@ test-backend-database:
reports: reports:
junit: ./fda-database-service/rest-service/target/surefire-reports/TEST-*.xml junit: ./fda-database-service/rest-service/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
timeout: 2 hour
test-backend-discovery: test-discovery-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-discovery - build-discovery-service
script: script:
- "make test-discovery-service" - "make test-discovery-service"
- "cat ./fda-discovery-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-discovery-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -189,10 +191,10 @@ test-backend-discovery: ...@@ -189,10 +191,10 @@ test-backend-discovery:
junit: ./fda-discovery-service/discovery/target/surefire-reports/TEST-*.xml junit: ./fda-discovery-service/discovery/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
test-backend-query: test-query-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-query - build-query-service
script: script:
- "make test-query-service" - "make test-query-service"
- "cat ./fda-query-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-query-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -205,11 +207,12 @@ test-backend-query: ...@@ -205,11 +207,12 @@ test-backend-query:
reports: reports:
junit: ./fda-query-service/rest-service/target/surefire-reports/TEST-*.xml junit: ./fda-query-service/rest-service/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
timeout: 2 hour
test-backend-table: test-table-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-table - build-table-service
script: script:
- "make test-table-service" - "make test-table-service"
- "cat ./fda-table-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-table-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -223,10 +226,10 @@ test-backend-table: ...@@ -223,10 +226,10 @@ test-backend-table:
junit: ./fda-table-service/rest-service/target/surefire-reports/TEST-*.xml junit: ./fda-table-service/rest-service/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
test-backend-metadata: test-metadata-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-metadata - build-metadata-service
script: script:
- "make test-metadata-service" - "make test-metadata-service"
- "cat ./fda-metadata-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-metadata-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -240,10 +243,10 @@ test-backend-metadata: ...@@ -240,10 +243,10 @@ test-backend-metadata:
junit: ./fda-metadata-service/rest-service/target/surefire-reports/TEST-*.xml junit: ./fda-metadata-service/rest-service/target/surefire-reports/TEST-*.xml
coverage: '/Total.*?([0-9]{1,3})%/' coverage: '/Total.*?([0-9]{1,3})%/'
test-backend-gateway: test-gateway-service:
stage: test-backend stage: test-backend
needs: needs:
- build-backend-gateway - build-gateway-service
script: script:
- "make test-gateway-service" - "make test-gateway-service"
- "cat ./fda-gateway-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'" - "cat ./fda-gateway-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
...@@ -289,19 +292,35 @@ test-analyse-service: ...@@ -289,19 +292,35 @@ test-analyse-service:
junit: ./fda-analyse-service/report.xml junit: ./fda-analyse-service/report.xml
coverage: '/TOTAL.*?([0-9]{1,3})%/' coverage: '/TOTAL.*?([0-9]{1,3})%/'
test-frontend:
stage: test-frontend
needs:
- build-frontend
script:
- "make test-frontend"
- "cat ./fda-ui/coverage.txt | grep -o 'Lines[^%]*%'"
artifacts:
when: always
paths:
- ./fda-analyse-service/report.xml
expire_in: 1 days
reports:
junit: ./fda-analyse-service/report.xml
coverage: '/TOTAL.*?([0-9]{1,3})%/'
build-docker: build-docker:
stage: build-docker stage: build-docker
needs: needs:
- build-backend-metadata-db - build-metadata-db
- build-backend-authentication - build-authentication-service
- build-backend-identifier - build-identifier-service
- build-backend-container - build-container-service
- build-backend-database - build-database-service
- build-backend-discovery - build-discovery-service
- build-backend-gateway - build-gateway-service
- build-backend-query - build-query-service
- build-backend-table - build-table-service
- build-backend-metadata - build-metadata-service
- build-semantics-service - build-semantics-service
- build-analyse-service - build-analyse-service
script: script:
......
#!/usr/bin/env python3
import sys
import xml.etree.ElementTree as ET
import re
import os.path
# branch-rate="0.0" complexity="0.0" line-rate="1.0"
# branch="true" hits="1" number="86"
def find_lines(j_package, filename):
"""Return all <line> elements for a given source file in a package."""
lines = list()
sourcefiles = j_package.findall("sourcefile")
for sourcefile in sourcefiles:
if sourcefile.attrib.get("name") == os.path.basename(filename):
lines = lines + sourcefile.findall("line")
return lines
def line_is_after(jm, start_line):
return int(jm.attrib.get('line', 0)) > start_line
def method_lines(jmethod, jmethods, jlines):
"""Filter the lines from the given set of jlines that apply to the given jmethod."""
start_line = int(jmethod.attrib.get('line', 0))
larger = list(int(jm.attrib.get('line', 0)) for jm in jmethods if line_is_after(jm, start_line))
end_line = min(larger) if len(larger) else 99999999
for jline in jlines:
if start_line <= int(jline.attrib['nr']) < end_line:
yield jline
def convert_lines(j_lines, into):
"""Convert the JaCoCo <line> elements into Cobertura <line> elements, add them under the given element."""
c_lines = ET.SubElement(into, 'lines')
for jline in j_lines:
mb = int(jline.attrib['mb'])
cb = int(jline.attrib['cb'])
ci = int(jline.attrib['ci'])
cline = ET.SubElement(c_lines, 'line')
cline.set('number', jline.attrib['nr'])
cline.set('hits', '1' if ci > 0 else '0') # Probably not true but no way to know from JaCoCo XML file
if mb + cb > 0:
percentage = str(int(100 * (float(cb) / (float(cb) + float(mb))))) + '%'
cline.set('branch', 'true')
cline.set('condition-coverage', percentage + ' (' + str(cb) + '/' + str(cb + mb) + ')')
cond = ET.SubElement(ET.SubElement(cline, 'conditions'), 'condition')
cond.set('number', '0')
cond.set('type', 'jump')
cond.set('coverage', percentage)
else:
cline.set('branch', 'false')
def guess_filename(path_to_class):
m = re.match('([^$]*)', path_to_class)
return (m.group(1) if m else path_to_class) + '.java'
def add_counters(source, target):
target.set('line-rate', counter(source, 'LINE'))
target.set('branch-rate', counter(source, 'BRANCH'))
target.set('complexity', counter(source, 'COMPLEXITY', sum))
def fraction(covered, missed):
return covered / (covered + missed)
def sum(covered, missed):
return covered + missed
def counter(source, type, operation=fraction):
cs = source.findall('counter')
c = next((ct for ct in cs if ct.attrib.get('type') == type), None)
if c is not None:
covered = float(c.attrib['covered'])
missed = float(c.attrib['missed'])
return str(operation(covered, missed))
else:
return '0.0'
def convert_method(j_method, j_lines):
c_method = ET.Element('method')
c_method.set('name', j_method.attrib['name'])
c_method.set('signature', j_method.attrib['desc'])
add_counters(j_method, c_method)
convert_lines(j_lines, c_method)
return c_method
def convert_class(j_class, j_package):
c_class = ET.Element('class')
c_class.set('name', j_class.attrib['name'].replace('/', '.'))
c_class.set('filename', guess_filename(j_class.attrib['name']))
all_j_lines = list(find_lines(j_package, c_class.attrib['filename']))
c_methods = ET.SubElement(c_class, 'methods')
all_j_methods = list(j_class.findall('method'))
for j_method in all_j_methods:
j_method_lines = method_lines(j_method, all_j_methods, all_j_lines)
c_methods.append(convert_method(j_method, j_method_lines))
add_counters(j_class, c_class)
convert_lines(all_j_lines, c_class)
return c_class
def convert_package(j_package):
c_package = ET.Element('package')
c_package.attrib['name'] = j_package.attrib['name'].replace('/', '.')
c_classes = ET.SubElement(c_package, 'classes')
for j_class in j_package.findall('class'):
c_classes.append(convert_class(j_class, j_package))
add_counters(j_package, c_package)
return c_package
def convert_root(source, target, source_roots):
target.set('timestamp', str(int(source.find('sessioninfo').attrib['start']) / 1000))
sources = ET.SubElement(target, 'sources')
for s in source_roots:
ET.SubElement(sources, 'source').text = s
packages = ET.SubElement(target, 'packages')
for package in source.findall('package'):
packages.append(convert_package(package))
add_counters(source, target)
def jacoco2cobertura(filename, source_roots):
if filename == '-':
root = ET.fromstring(sys.stdin.read())
else:
tree = ET.parse(filename)
root = tree.getroot()
into = ET.Element('coverage')
convert_root(root, into, source_roots)
print(ET.tostring(into, encoding='utf8', method='xml').decode("utf-8"))
if __name__ == '__main__':
if len(sys.argv) < 2:
print("Usage: cover2cover.py FILENAME [SOURCE_ROOTS]")
sys.exit(1)
filename = sys.argv[1]
source_roots = sys.argv[2:] if 2 < len(sys.argv) else '.'
jacoco2cobertura(filename, source_roots)
\ No newline at end of file
###########################################################
# PLACE IN /etc/hosts #
###########################################################
172.30.0.5 dbrepo-userdb-u01
172.30.0.6 dbrepo-userdb-u02
172.30.0.7 dbrepo-userdb-u03
172.30.0.8 dbrepo-userdb-u04
172.31.0.2 dbrepo-broker-service
172.31.0.3 dbrepo-search-service
\ No newline at end of file
File moved
...@@ -4,39 +4,36 @@ TAG ?= latest ...@@ -4,39 +4,36 @@ TAG ?= latest
all: all:
clean: build-backend: build-metadata-db build-database-service build-query-service build-table-service build-identifier-service build-authentication-service build-container-service build-discovery-service build-gateway-service build-metadata-service build-analyse-service
bash ./.dbrepo2/clean.sh
build-backend: build-backend-metadata-db build-backend-database build-backend-query build-backend-table build-backend-identifier build-backend-authentication build-backend-container build-backend-discovery build-backend-gateway build-backend-metadata build-analyse-service
build-backend-metadata-db: build-metadata-db:
mvn -f ./fda-metadata-db/pom.xml clean install mvn -f ./fda-metadata-db/pom.xml clean install
build-backend-authentication: build-backend-metadata-db build-authentication-service: build-metadata-db
mvn -f ./fda-authentication-service/pom.xml clean package -DskipTests mvn -f ./fda-authentication-service/pom.xml clean package -DskipTests
build-backend-identifier: build-backend-metadata-db build-identifier-service: build-metadata-db
mvn -f ./fda-identifier-service/pom.xml clean package -DskipTests mvn -f ./fda-identifier-service/pom.xml clean package -DskipTests
build-backend-table: build-backend-metadata-db build-table-service: build-metadata-db
mvn -f ./fda-table-service/pom.xml clean package -DskipTests mvn -f ./fda-table-service/pom.xml clean package -DskipTests
build-backend-container: build-backend-metadata-db build-container-service: build-metadata-db
mvn -f ./fda-container-service/pom.xml clean package -DskipTests mvn -f ./fda-container-service/pom.xml clean package -DskipTests
build-backend-database: build-backend-metadata-db build-database-service: build-metadata-db
mvn -f ./fda-database-service/pom.xml clean package -DskipTests mvn -f ./fda-database-service/pom.xml clean package -DskipTests
build-backend-discovery: build-backend-metadata-db build-discovery-service: build-metadata-db
mvn -f ./fda-discovery-service/pom.xml clean package -DskipTests mvn -f ./fda-discovery-service/pom.xml clean package -DskipTests
build-backend-gateway: build-backend-metadata-db build-gateway-service: build-metadata-db
mvn -f ./fda-gateway-service/pom.xml clean package -DskipTests mvn -f ./fda-gateway-service/pom.xml clean package -DskipTests
build-backend-query: build-backend-metadata-db build-query-service: build-metadata-db
mvn -f ./fda-query-service/pom.xml clean package -DskipTests mvn -f ./fda-query-service/pom.xml clean package -DskipTests
build-backend-metadata: build-backend-metadata-db build-metadata-service: build-metadata-db
mvn -f ./fda-metadata-service/pom.xml clean package -DskipTests mvn -f ./fda-metadata-service/pom.xml clean package -DskipTests
build-semantics-service: build-semantics-service:
...@@ -150,93 +147,35 @@ release-search: ...@@ -150,93 +147,35 @@ release-search:
release-metadata: release-metadata:
docker push "dbrepo/metadata-service:${TAG}" docker push "dbrepo/metadata-service:${TAG}"
pull: pull-identifier pull-container pull-search pull-database pull-discovery pull-gateway pull-query pull-table pull-analyse pull-authentication pull-metadata-db pull-ui pull-units pull-broker pull-metadata
pull-analyse:
docker pull "dbrepo/analyse-service:${TAG}"
pull-authentication:
docker pull "dbrepo/authentication-service:${TAG}"
pull-metadata-db:
docker pull "dbrepo/metadata-db:${TAG}"
pull-ui:
docker pull "dbrepo/ui:${TAG}"
pull-identifier:
docker pull "dbrepo/identifier-service:${TAG}"
pull-container:
docker pull "dbrepo/container-service:${TAG}"
pull-database:
docker pull "dbrepo/database-service:${TAG}"
pull-discovery:
docker pull "dbrepo/discovery-service:${TAG}"
pull-gateway:
docker pull "dbrepo/gateway-service:${TAG}"
pull-query:
docker pull "dbrepo/query-service:${TAG}"
pull-table:
docker pull "dbrepo/table-service:${TAG}"
pull-units:
docker pull "dbrepo/semantics-service:${TAG}"
pull-broker:
docker pull "dbrepo/broker-service:${TAG}"
pull-metadata:
docker pull "dbrepo/metadata-service:${TAG}"
pull-search:
docker pull "dbrepo/search-service:${TAG}"
test-backend: test-authentication-service test-container-service test-database-service test-discovery-service test-gateway-service test-query-service test-table-service test-identifier-service test-metadata-service test-semantics-service test-analyse-service test-backend: test-authentication-service test-container-service test-database-service test-discovery-service test-gateway-service test-query-service test-table-service test-identifier-service test-metadata-service test-semantics-service test-analyse-service
test-authentication-service: build-backend-metadata-db build-backend-authentication test-authentication-service: clean build-metadata-db build-authentication-service
docker system prune -f --volumes
docker pull rabbitmq:3-management-alpine docker pull rabbitmq:3-management-alpine
mvn -f ./fda-authentication-service/pom.xml clean test verify mvn -f ./fda-authentication-service/pom.xml clean test verify
test-identifier-service: build-backend-metadata-db build-backend-identifier test-identifier-service: clean build-metadata-db build-identifier-service
docker system prune -f --volumes
mvn -f ./fda-identifier-service/pom.xml clean test verify mvn -f ./fda-identifier-service/pom.xml clean test verify
test-container-service: build-backend-metadata-db build-backend-container test-container-service: clean build-metadata-db build-container-service
docker system prune -f --volumes
docker pull mysql:8.0
mvn -f ./fda-container-service/pom.xml clean test verify mvn -f ./fda-container-service/pom.xml clean test verify
test-database-service: build-backend-metadata-db build-backend-database test-database-service: clean build-metadata-db build-database-service
docker system prune -f --volumes
docker pull rabbitmq:3-management-alpine docker pull rabbitmq:3-management-alpine
docker pull nginx:alpine
mvn -f ./fda-database-service/pom.xml clean test verify mvn -f ./fda-database-service/pom.xml clean test verify
test-discovery-service: build-backend-metadata-db build-backend-discovery test-discovery-service: clean build-metadata-db build-discovery-service
docker system prune -f --volumes
mvn -f ./fda-discovery-service/pom.xml clean test verify mvn -f ./fda-discovery-service/pom.xml clean test verify
test-gateway-service: build-backend-metadata-db build-backend-gateway test-gateway-service: clean build-metadata-db build-gateway-service
docker system prune -f --volumes
mvn -f ./fda-gateway-service/pom.xml clean test verify mvn -f ./fda-gateway-service/pom.xml clean test verify
test-query-service: build-backend-metadata-db build-backend-query test-query-service: clean build-metadata-db build-query-service
docker system prune -f --volumes
mvn -f ./fda-query-service/pom.xml clean test verify mvn -f ./fda-query-service/pom.xml clean test verify
test-table-service: build-backend-metadata-db build-backend-table test-table-service: clean build-metadata-db build-table-service
docker system prune -f --volumes
mvn -f ./fda-table-service/pom.xml clean test verify mvn -f ./fda-table-service/pom.xml clean test verify
test-metadata-service: build-backend-metadata-db build-backend-metadata test-metadata-service: clean build-metadata-db build-metadata-service
docker system prune -f --volumes
mvn -f ./fda-metadata-service/pom.xml clean test verify mvn -f ./fda-metadata-service/pom.xml clean test verify
test-semantics-service: build-semantics-service test-semantics-service: build-semantics-service
...@@ -245,13 +184,16 @@ test-semantics-service: build-semantics-service ...@@ -245,13 +184,16 @@ test-semantics-service: build-semantics-service
test-analyse-service: build-analyse-service test-analyse-service: build-analyse-service
bash ./fda-analyse-service/test.sh bash ./fda-analyse-service/test.sh
coverage-frontend: clean build-frontend coverage-frontend: build-frontend
yarn --cwd ./fda-ui run coverage || true yarn --cwd ./fda-ui run coverage || true
test-frontend: clean build-frontend test-frontend: clean build-frontend
yarn --cwd ./fda-ui install yarn --cwd ./fda-ui install
docker compose up -d yarn --cwd ./fda-ui run test:unit || true
yarn --cwd ./fda-ui run test yarn --cwd ./fda-ui run coverage || true
clean:
docker system prune -f --volumes
test-clients: test-clients:
bash ./.gitlab/test.sh bash ./.gitlab/test.sh
...@@ -259,4 +201,4 @@ test-clients: ...@@ -259,4 +201,4 @@ test-clients:
test: test-backend test-frontend test: test-backend test-frontend
teardown: teardown:
./.dbrepo2/teardown ./.junit/teardown
...@@ -31,7 +31,7 @@ networks: ...@@ -31,7 +31,7 @@ networks:
services: services:
metadata-db: dbrepo-metadata-db:
restart: on-failure restart: on-failure
container_name: dbrepo-metadata-db container_name: dbrepo-metadata-db
hostname: metadata-db hostname: metadata-db
...@@ -60,7 +60,7 @@ services: ...@@ -60,7 +60,7 @@ services:
logging: logging:
driver: json-file driver: json-file
gateway-service: dbrepo-gateway-service:
restart: on-failure restart: on-failure
container_name: dbrepo-gateway-service container_name: dbrepo-gateway-service
hostname: gateway-service hostname: gateway-service
...@@ -72,12 +72,12 @@ services: ...@@ -72,12 +72,12 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
database-service: dbrepo-database-service:
restart: on-failure restart: on-failure
container_name: dbrepo-database-service container_name: dbrepo-database-service
hostname: database-service hostname: database-service
...@@ -90,16 +90,16 @@ services: ...@@ -90,16 +90,16 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
container-service: dbrepo-container-service:
condition: service_healthy condition: service_healthy
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
container-service: dbrepo-container-service:
restart: on-failure restart: on-failure
container_name: dbrepo-container-service container_name: dbrepo-container-service
hostname: container-service hostname: container-service
...@@ -111,12 +111,12 @@ services: ...@@ -111,12 +111,12 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
authentication-service: dbrepo-authentication-service:
restart: on-failure restart: on-failure
container_name: dbrepo-authentication-service container_name: dbrepo-authentication-service
hostname: authentication-service hostname: authentication-service
...@@ -126,16 +126,16 @@ services: ...@@ -126,16 +126,16 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
metadata-db: dbrepo-metadata-db:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
query-service: dbrepo-query-service:
restart: on-failure restart: on-failure
container_name: dbrepo-query-service container_name: dbrepo-query-service
hostname: query-service hostname: query-service
...@@ -148,14 +148,14 @@ services: ...@@ -148,14 +148,14 @@ services:
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
table-service: dbrepo-table-service:
condition: service_healthy condition: service_healthy
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
table-service: dbrepo-table-service:
restart: on-failure restart: on-failure
container_name: dbrepo-table-service container_name: dbrepo-table-service
hostname: table-service hostname: table-service
...@@ -169,16 +169,16 @@ services: ...@@ -169,16 +169,16 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
search-service: dbrepo-search-service:
condition: service_started condition: service_started
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
logging: logging:
driver: json-file driver: json-file
identifier-service: dbrepo-identifier-service:
restart: on-failure restart: on-failure
container_name: dbrepo-identifier-service container_name: dbrepo-identifier-service
hostname: identifier-service hostname: identifier-service
...@@ -188,16 +188,16 @@ services: ...@@ -188,16 +188,16 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
query-service: dbrepo-query-service:
condition: service_healthy condition: service_healthy
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
logging: logging:
driver: json-file driver: json-file
fda-metadata-service: dbrepo-metadata-service:
restart: on-failure restart: on-failure
container_name: dbrepo-metadata-service container_name: dbrepo-metadata-service
hostname: metadata-service hostname: metadata-service
...@@ -207,12 +207,12 @@ services: ...@@ -207,12 +207,12 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
metadata-db: dbrepo-metadata-db:
condition: service_started condition: service_started
logging: logging:
driver: json-file driver: json-file
analyse-service: dbrepo-analyse-service:
restart: on-failure restart: on-failure
container_name: dbrepo-analyse-service container_name: dbrepo-analyse-service
hostname: analyse-service hostname: analyse-service
...@@ -226,12 +226,12 @@ services: ...@@ -226,12 +226,12 @@ services:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
semantics-service: dbrepo-semantics-service:
restart: on-failure restart: on-failure
container_name: dbrepo-semantics-service container_name: dbrepo-semantics-service
hostname: semantics-service hostname: semantics-service
...@@ -244,14 +244,14 @@ services: ...@@ -244,14 +244,14 @@ services:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
metadata-db: dbrepo-metadata-db:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
broker-service: dbrepo-broker-service:
restart: on-failure restart: on-failure
container_name: dbrepo-broker-service container_name: dbrepo-broker-service
hostname: broker-service hostname: broker-service
...@@ -264,14 +264,14 @@ services: ...@@ -264,14 +264,14 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
volumes: volumes:
- broker-service-data:/var/lib/rabbitmq/ - broker-service-data:/var/lib/rabbitmq/
logging: logging:
driver: json-file driver: json-file
search-service: dbrepo-search-service:
restart: always restart: always
container_name: dbrepo-search-service container_name: dbrepo-search-service
hostname: search-service hostname: search-service
...@@ -279,7 +279,7 @@ services: ...@@ -279,7 +279,7 @@ services:
networks: networks:
core: core:
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
ports: ports:
- 9200:9200 - 9200:9200
...@@ -290,7 +290,7 @@ services: ...@@ -290,7 +290,7 @@ services:
logging: logging:
driver: json-file driver: json-file
ui: dbrepo-ui:
restart: on-failure restart: on-failure
container_name: dbrepo-ui container_name: dbrepo-ui
hostname: ui hostname: ui
...@@ -303,9 +303,9 @@ services: ...@@ -303,9 +303,9 @@ services:
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
identifier-service: dbrepo-identifier-service:
condition: service_healthy condition: service_healthy
database-service: dbrepo-database-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
...@@ -31,7 +31,7 @@ networks: ...@@ -31,7 +31,7 @@ networks:
services: services:
metadata-db: dbrepo-metadata-db:
restart: on-failure restart: on-failure
container_name: dbrepo-metadata-db container_name: dbrepo-metadata-db
hostname: metadata-db hostname: metadata-db
...@@ -48,7 +48,7 @@ services: ...@@ -48,7 +48,7 @@ services:
logging: logging:
driver: json-file driver: json-file
discovery-service: dbrepo-discovery-service:
restart: on-failure restart: on-failure
container_name: dbrepo-discovery-service container_name: dbrepo-discovery-service
hostname: discovery-service hostname: discovery-service
...@@ -60,7 +60,7 @@ services: ...@@ -60,7 +60,7 @@ services:
logging: logging:
driver: json-file driver: json-file
gateway-service: dbrepo-gateway-service:
restart: on-failure restart: on-failure
container_name: dbrepo-gateway-service container_name: dbrepo-gateway-service
hostname: gateway-service hostname: gateway-service
...@@ -72,12 +72,12 @@ services: ...@@ -72,12 +72,12 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
database-service: dbrepo-database-service:
restart: on-failure restart: on-failure
container_name: dbrepo-database-service container_name: dbrepo-database-service
hostname: database-service hostname: database-service
...@@ -90,16 +90,16 @@ services: ...@@ -90,16 +90,16 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
container-service: dbrepo-container-service:
condition: service_healthy condition: service_healthy
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
container-service: dbrepo-container-service:
restart: on-failure restart: on-failure
container_name: dbrepo-container-service container_name: dbrepo-container-service
hostname: container-service hostname: container-service
...@@ -111,12 +111,12 @@ services: ...@@ -111,12 +111,12 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
authentication-service: dbrepo-authentication-service:
restart: on-failure restart: on-failure
container_name: dbrepo-authentication-service container_name: dbrepo-authentication-service
hostname: authentication-service hostname: authentication-service
...@@ -126,16 +126,16 @@ services: ...@@ -126,16 +126,16 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
metadata-db: dbrepo-metadata-db:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
query-service: dbrepo-query-service:
restart: on-failure restart: on-failure
container_name: dbrepo-query-service container_name: dbrepo-query-service
hostname: query-service hostname: query-service
...@@ -148,14 +148,14 @@ services: ...@@ -148,14 +148,14 @@ services:
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
table-service: dbrepo-table-service:
condition: service_healthy condition: service_healthy
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
table-service: dbrepo-table-service:
restart: on-failure restart: on-failure
container_name: dbrepo-table-service container_name: dbrepo-table-service
hostname: table-service hostname: table-service
...@@ -169,16 +169,16 @@ services: ...@@ -169,16 +169,16 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
search-service: dbrepo-search-service:
condition: service_started condition: service_started
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
logging: logging:
driver: json-file driver: json-file
identifier-service: dbrepo-identifier-service:
restart: on-failure restart: on-failure
container_name: dbrepo-identifier-service container_name: dbrepo-identifier-service
hostname: identifier-service hostname: identifier-service
...@@ -188,16 +188,16 @@ services: ...@@ -188,16 +188,16 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
query-service: dbrepo-query-service:
condition: service_healthy condition: service_healthy
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
logging: logging:
driver: json-file driver: json-file
metadata-service: dbrepo-metadata-service:
restart: on-failure restart: on-failure
container_name: dbrepo-metadata-service container_name: dbrepo-metadata-service
hostname: metadata-service hostname: metadata-service
...@@ -207,12 +207,12 @@ services: ...@@ -207,12 +207,12 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
metadata-db: dbrepo-metadata-db:
condition: service_started condition: service_started
logging: logging:
driver: json-file driver: json-file
analyse-service: dbrepo-analyse-service:
restart: on-failure restart: on-failure
container_name: dbrepo-analyse-service container_name: dbrepo-analyse-service
hostname: analyse-service hostname: analyse-service
...@@ -226,12 +226,12 @@ services: ...@@ -226,12 +226,12 @@ services:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
semantics-service: dbrepo-semantics-service:
restart: on-failure restart: on-failure
container_name: dbrepo-semantics-service container_name: dbrepo-semantics-service
hostname: semantics-service hostname: semantics-service
...@@ -244,14 +244,14 @@ services: ...@@ -244,14 +244,14 @@ services:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
metadata-db: dbrepo-metadata-db:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
broker-service: dbrepo-broker-service:
restart: on-failure restart: on-failure
container_name: dbrepo-broker-service container_name: dbrepo-broker-service
hostname: broker-service hostname: broker-service
...@@ -264,14 +264,14 @@ services: ...@@ -264,14 +264,14 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
volumes: volumes:
- broker-service-data:/var/lib/rabbitmq/ - broker-service-data:/var/lib/rabbitmq/
logging: logging:
driver: json-file driver: json-file
search-service: dbrepo-search-service:
restart: always restart: always
container_name: dbrepo-search-service container_name: dbrepo-search-service
hostname: search-service hostname: search-service
...@@ -279,7 +279,7 @@ services: ...@@ -279,7 +279,7 @@ services:
networks: networks:
core: core:
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
env_file: env_file:
- .env - .env
...@@ -288,7 +288,7 @@ services: ...@@ -288,7 +288,7 @@ services:
logging: logging:
driver: json-file driver: json-file
ui: dbrepo-ui:
restart: on-failure restart: on-failure
container_name: dbrepo-ui container_name: dbrepo-ui
hostname: ui hostname: ui
...@@ -301,9 +301,9 @@ services: ...@@ -301,9 +301,9 @@ services:
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
identifier-service: dbrepo-identifier-service:
condition: service_healthy condition: service_healthy
database-service: dbrepo-database-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
...@@ -31,7 +31,7 @@ networks: ...@@ -31,7 +31,7 @@ networks:
services: services:
metadata-db: dbrepo-metadata-db:
restart: on-failure restart: on-failure
container_name: dbrepo-metadata-db container_name: dbrepo-metadata-db
hostname: metadata-db hostname: metadata-db
...@@ -48,7 +48,7 @@ services: ...@@ -48,7 +48,7 @@ services:
logging: logging:
driver: json-file driver: json-file
discovery-service: dbrepo-discovery-service:
restart: on-failure restart: on-failure
container_name: dbrepo-discovery-service container_name: dbrepo-discovery-service
hostname: discovery-service hostname: discovery-service
...@@ -60,7 +60,7 @@ services: ...@@ -60,7 +60,7 @@ services:
logging: logging:
driver: json-file driver: json-file
gateway-service: dbrepo-gateway-service:
restart: on-failure restart: on-failure
container_name: dbrepo-gateway-service container_name: dbrepo-gateway-service
hostname: gateway-service hostname: gateway-service
...@@ -72,12 +72,12 @@ services: ...@@ -72,12 +72,12 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
database-service: dbrepo-database-service:
restart: on-failure restart: on-failure
container_name: dbrepo-database-service container_name: dbrepo-database-service
hostname: database-service hostname: database-service
...@@ -90,16 +90,16 @@ services: ...@@ -90,16 +90,16 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
container-service: dbrepo-container-service:
condition: service_healthy condition: service_healthy
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
container-service: dbrepo-container-service:
restart: on-failure restart: on-failure
container_name: dbrepo-container-service container_name: dbrepo-container-service
hostname: container-service hostname: container-service
...@@ -111,12 +111,12 @@ services: ...@@ -111,12 +111,12 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
authentication-service: dbrepo-authentication-service:
restart: on-failure restart: on-failure
container_name: dbrepo-authentication-service container_name: dbrepo-authentication-service
hostname: authentication-service hostname: authentication-service
...@@ -126,16 +126,16 @@ services: ...@@ -126,16 +126,16 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
metadata-db: dbrepo-metadata-db:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
query-service: dbrepo-query-service:
restart: on-failure restart: on-failure
container_name: dbrepo-query-service container_name: dbrepo-query-service
hostname: query-service hostname: query-service
...@@ -148,14 +148,14 @@ services: ...@@ -148,14 +148,14 @@ services:
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
table-service: dbrepo-table-service:
condition: service_healthy condition: service_healthy
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
table-service: dbrepo-table-service:
restart: on-failure restart: on-failure
container_name: dbrepo-table-service container_name: dbrepo-table-service
hostname: table-service hostname: table-service
...@@ -169,16 +169,16 @@ services: ...@@ -169,16 +169,16 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
search-service: dbrepo-search-service:
condition: service_started condition: service_started
broker-service: dbrepo-broker-service:
condition: service_started condition: service_started
logging: logging:
driver: json-file driver: json-file
identifier-service: dbrepo-identifier-service:
restart: on-failure restart: on-failure
container_name: dbrepo-identifier-service container_name: dbrepo-identifier-service
hostname: identifier-service hostname: identifier-service
...@@ -188,16 +188,16 @@ services: ...@@ -188,16 +188,16 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
query-service: dbrepo-query-service:
condition: service_healthy condition: service_healthy
authentication-service: dbrepo-authentication-service:
condition: service_healthy condition: service_healthy
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
logging: logging:
driver: json-file driver: json-file
metadata-service: dbrepo-metadata-service:
restart: on-failure restart: on-failure
container_name: dbrepo-metadata-service container_name: dbrepo-metadata-service
hostname: metadata-service hostname: metadata-service
...@@ -207,12 +207,12 @@ services: ...@@ -207,12 +207,12 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
metadata-db: dbrepo-metadata-db:
condition: service_started condition: service_started
logging: logging:
driver: json-file driver: json-file
analyse-service: dbrepo-analyse-service:
restart: on-failure restart: on-failure
container_name: dbrepo-analyse-service container_name: dbrepo-analyse-service
hostname: analyse-service hostname: analyse-service
...@@ -226,12 +226,12 @@ services: ...@@ -226,12 +226,12 @@ services:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
semantics-service: dbrepo-semantics-service:
restart: on-failure restart: on-failure
container_name: dbrepo-semantics-service container_name: dbrepo-semantics-service
hostname: semantics-service hostname: semantics-service
...@@ -244,14 +244,14 @@ services: ...@@ -244,14 +244,14 @@ services:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
metadata-db: dbrepo-metadata-db:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
broker-service: dbrepo-broker-service:
restart: on-failure restart: on-failure
container_name: dbrepo-broker-service container_name: dbrepo-broker-service
hostname: broker-service hostname: broker-service
...@@ -263,14 +263,14 @@ services: ...@@ -263,14 +263,14 @@ services:
env_file: env_file:
- .env - .env
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
volumes: volumes:
- broker-service-data:/var/lib/rabbitmq/ - broker-service-data:/var/lib/rabbitmq/
logging: logging:
driver: json-file driver: json-file
search-service: dbrepo-search-service:
restart: always restart: always
container_name: dbrepo-search-service container_name: dbrepo-search-service
hostname: search-service hostname: search-service
...@@ -278,7 +278,7 @@ services: ...@@ -278,7 +278,7 @@ services:
networks: networks:
core: core:
depends_on: depends_on:
discovery-service: dbrepo-discovery-service:
condition: service_healthy condition: service_healthy
env_file: env_file:
- .env - .env
...@@ -287,7 +287,7 @@ services: ...@@ -287,7 +287,7 @@ services:
logging: logging:
driver: json-file driver: json-file
ui: dbrepo-ui:
restart: on-failure restart: on-failure
container_name: dbrepo-ui container_name: dbrepo-ui
hostname: ui hostname: ui
...@@ -295,14 +295,16 @@ services: ...@@ -295,14 +295,16 @@ services:
networks: networks:
core: core:
public: public:
ports:
- "3000:3000"
env_file: env_file:
- .env - .env
volumes: volumes:
- ${SHARED_FILESYSTEM}:/tmp - ${SHARED_FILESYSTEM}:/tmp
depends_on: depends_on:
identifier-service: dbrepo-identifier-service:
condition: service_healthy condition: service_healthy
database-service: dbrepo-database-service:
condition: service_healthy condition: service_healthy
logging: logging:
driver: json-file driver: json-file
...@@ -10,27 +10,26 @@ volumes: ...@@ -10,27 +10,26 @@ volumes:
broker-service-data: broker-service-data:
networks: networks:
public: userdb:
name: public name: userdb
driver: bridge driver: bridge
ipam: ipam:
config: config:
- subnet: 172.29.0.0/16 - subnet: 172.30.0.0/16
userdb: public:
name: userdb name: public
driver: bridge driver: bridge
ipam: ipam:
config: config:
- subnet: 172.28.0.0/16 - subnet: 172.31.0.0/16
core: core:
name: core name: core
driver: bridge driver: bridge
ipam: ipam:
config: config:
- subnet: 172.27.0.0/16 - subnet: 172.32.0.0/16
services: services:
fda-metadata-db: fda-metadata-db:
restart: on-failure restart: on-failure
container_name: dbrepo-metadata-db container_name: dbrepo-metadata-db
......
Name Stmts Miss Cover
-----------------------------------------------
determine_dt.py 56 16 71%
determine_pk.py 49 0 100%
test/__init__.py 0 0 100%
test/test_determine_dt.py 34 7 79%
test/test_determine_pk.py 41 1 98%
-----------------------------------------------
TOTAL 180 24 87%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment