Skip to content
Snippets Groups Projects
Verified Commit 3d47731f authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch 'dev' of gitlab.phaidra.org:fair-data-austria-db-repository/fda-services into dev

parents 45ffc799 b09cb77c
Branches
Tags
7 merge requests!345Updated docs and endpoints:,!341Fixed mapping problem where UK and FK share columns they are inserted,!339Fixed mapping problem where UK and FK share columns they are inserted,!338Fixed mapping problem where UK and FK share columns they are inserted,!334Fixed mapping problem where UK and FK share columns they are inserted,!333Fixed mapping problem where UK and FK share columns they are inserted,!325Dev
File deleted
...@@ -156,6 +156,37 @@ build-helm: ...@@ -156,6 +156,37 @@ build-helm:
- apk add sed helm curl - apk add sed helm curl
- helm package ./helm/dbrepo --destination ./build - helm package ./helm/dbrepo --destination ./build
lint-docker-compose:
image: docker.io/alpine:3.18
stage: lint
variables:
VERSION: 3.3.0
BINARY: yq_linux_amd64
before_script:
- 'apk --no-cache add bash wget'
- 'wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq && chmod +x /usr/bin/yq'
- 'ls -la .scripts'
script:
- "yq compare -P docker-compose.yml .docker/docker-compose.yml 'volumes.*'"
- "IGNORE_VOLUMES=1 bash .scripts/check-service.sh 'dbrepo-metadata-db'"
- "bash .scripts/check-service.sh 'dbrepo-data-db'"
- "bash .scripts/check-service.sh 'dbrepo-auth-db'"
- "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-auth-service'"
- "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-metadata-service'"
- "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-analyse-service'"
- "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-broker-service'"
- "IGNORE_IMAGE=1 bash .scripts/check-service.sh 'dbrepo-search-db'"
- "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-search-service'"
- "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-data-db-sidecar'"
- "IGNORE_IMAGE=1 bash .scripts/check-service.sh 'dbrepo-ui'"
- "IGNORE_VOLUMES=1 bash .scripts/check-service.sh 'dbrepo-gateway-service'"
- "IGNORE_VOLUMES=1 bash .scripts/check-service.sh 'dbrepo-identity-service'"
- "IGNORE_IMAGE=1 bash .scripts/check-service.sh 'dbrepo-search-service-init'"
- "IGNORE_VOLUMES=1 bash .scripts/check-service.sh 'dbrepo-storage-service'"
- "IGNORE_VOLUMES=1 bash .scripts/check-service.sh 'dbrepo-storage-service-init'"
- "bash .scripts/check-service.sh 'dbrepo-upload-service'"
- "IGNORE_IMAGE=1 IGNORE_PORTS=1 bash .scripts/check-service.sh 'dbrepo-data-service'"
verify-install-script: verify-install-script:
image: docker.io/docker:24-dind image: docker.io/docker:24-dind
stage: verify stage: verify
...@@ -401,12 +432,13 @@ release-docs: ...@@ -401,12 +432,13 @@ release-docs:
- "pip install -r ./requirements.txt" - "pip install -r ./requirements.txt"
- "mkdir -p ./final/${APP_VERSION}/rest" - "mkdir -p ./final/${APP_VERSION}/rest"
script: script:
- "make gen-lib-doc gen-docs-doc" - "make gen-lib-doc gen-docs-doc package-config"
- "cp -r ./lib/python/docs/build/html ./final/${APP_VERSION}/python" # sphinx - "cp -r ./lib/python/docs/build/html ./final/${APP_VERSION}/python" # sphinx
- "cp .docs/.swagger/api.yaml ./final/${APP_VERSION}/rest/api.yaml" # swagger - "cp .docs/.swagger/api.yaml ./final/${APP_VERSION}/rest/api.yaml" # swagger
- "cp .docs/.swagger/swagger-ui.html ./final/${APP_VERSION}/rest/index.html" # swagger - "cp .docs/.swagger/swagger-ui.html ./final/${APP_VERSION}/rest/index.html" # swagger
- "cp .docs/.swagger/custom.css ./final/${APP_VERSION}/rest/custom.css" # swagger - "cp .docs/.swagger/custom.css ./final/${APP_VERSION}/rest/custom.css" # swagger
- "cp -r ./site/* ./final/${APP_VERSION}" # mkdocs - "cp -r ./site/* ./final/${APP_VERSION}" # mkdocs
- "cp .docker/dist.tar.gz ./final/${APP_VERSION}/dist.tar.gz" # dist
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- "mkdir -p /root/.ssh" - "mkdir -p /root/.ssh"
- echo "$CI_KEY_PRIVATE" > /root/.ssh/id_rsa && chmod 0600 /root/.ssh/id_rsa - echo "$CI_KEY_PRIVATE" > /root/.ssh/id_rsa && chmod 0600 /root/.ssh/id_rsa
......
#!/bin/bash
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.restart"
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.container_name"
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.hostname"
if [ -z "$IGNORE_IMAGE" ]; then
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.image"
fi
if [ -z "$IGNORE_VOLUMES" ]; then
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.volumes"
fi
if [ -z "$IGNORE_PORTS" ]; then
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.ports"
fi
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.environment"
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.healthcheck"
yq compare -P docker-compose.yml .docker/docker-compose.yml "services.$1.logging"
\ No newline at end of file
...@@ -16,7 +16,6 @@ version: ## Get current version. ...@@ -16,7 +16,6 @@ version: ## Get current version.
@echo $(APP_VERSION) @echo $(APP_VERSION)
include make/build.mk include make/build.mk
include make/dep.mk
include make/dev.mk include make/dev.mk
include make/gen.mk include make/gen.mk
include make/rel.mk include make/rel.mk
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# preset # preset
VERSION="1.4.6" VERSION="1.4.6"
MIN_CPU=8 MIN_CPU=8
MIN_RAM=8 MIN_RAM=4
MIN_MAP_COUNT=262144 MIN_MAP_COUNT=262144
SKIP_CHECKS=${SKIP_CHECKS:-0} SKIP_CHECKS=${SKIP_CHECKS:-0}
DOWNLOAD_ONLY=${DOWNLOAD_ONLY:-0} DOWNLOAD_ONLY=${DOWNLOAD_ONLY:-0}
...@@ -58,7 +58,7 @@ fi ...@@ -58,7 +58,7 @@ fi
# environment # environment
echo "[🚀] Gathering environment for version ${VERSION} ..." echo "[🚀] Gathering environment for version ${VERSION} ..."
curl -sSL -o ./dist.tar.gz "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-${VERSION}/.docker/dist.tar.gz" curl -sSL -o ./dist.tar.gz "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/${VERSION}/dist.tar.gz"
tar xzfv ./dist.tar.gz tar xzfv ./dist.tar.gz
if [[ $DOWNLOAD_ONLY -eq 1 ]]; then if [[ $DOWNLOAD_ONLY -eq 1 ]]; then
......
##@ Deployment
.PHONY: start
start: ## Run stable deployment.
docker compose -f docker-compose.prod.yml up -d
.PHONY: stop
stop: ## Run stable deployment.
docker compose -f docker-compose.prod.yml down
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment