From 30e4d79d92922073798175481de8de12ecf2ffd0 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Thu, 25 Jan 2024 11:03:11 +0100
Subject: [PATCH] Updated TAG

---
 .docs/.swagger/api-analyse.yaml                       |  2 +-
 .docs/.swagger/api-data.yaml                          |  2 +-
 .docs/.swagger/api-metadata.yaml                      |  2 +-
 .docs/.swagger/api-search.yaml                        |  2 +-
 .docs/.swagger/api-sidecar.yaml                       |  2 +-
 .docs/.swagger/api-upload.yaml                        |  2 +-
 .docs/system-databases-data.md                        |  2 +-
 .docs/system-databases-metadata.md                    |  2 +-
 .docs/system-databases-search.md                      |  2 +-
 .docs/system-other-ui.md                              |  6 +++---
 .docs/system-services-analyse.md                      |  2 +-
 .docs/system-services-authentication.md               |  2 +-
 .docs/system-services-data.md                         |  2 +-
 .docs/system-services-metadata.md                     |  2 +-
 .docs/system-services-search.md                       |  2 +-
 .gitlab-ci.yml                                        | 11 ++++-------
 dbrepo-analyse-service/app.py                         |  2 +-
 dbrepo-data-db/sidecar/app.py                         |  2 +-
 .../src/main/java/at/tuwien/config/SwaggerConfig.java |  2 +-
 .../src/main/java/at/tuwien/config/SwaggerConfig.java |  2 +-
 dbrepo-search-service/app/__init__.py                 |  2 +-
 21 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/.docs/.swagger/api-analyse.yaml b/.docs/.swagger/api-analyse.yaml
index 7dc467e7ad..b59837ca7e 100644
--- a/.docs/.swagger/api-analyse.yaml
+++ b/.docs/.swagger/api-analyse.yaml
@@ -12,7 +12,7 @@ info:
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0
   title: Database Repository Analyse Service API
-  version: __TAG__
+  version: __APPVERSION__
 openapi: 3.0.0
 paths:
   /api/analyse/determinedt:
diff --git a/.docs/.swagger/api-data.yaml b/.docs/.swagger/api-data.yaml
index 1c50ab8f46..0b089a6327 100644
--- a/.docs/.swagger/api-data.yaml
+++ b/.docs/.swagger/api-data.yaml
@@ -8,7 +8,7 @@ info:
   license:
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0
-  version: __TAG__
+  version: __APPVERSION__
 externalDocs:
   description: Sourcecode Documentation
   url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
diff --git a/.docs/.swagger/api-metadata.yaml b/.docs/.swagger/api-metadata.yaml
index 272bf7ae58..185142b56e 100644
--- a/.docs/.swagger/api-metadata.yaml
+++ b/.docs/.swagger/api-metadata.yaml
@@ -8,7 +8,7 @@ info:
   license:
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0
-  version: __TAG__
+  version: __APPVERSION__
 externalDocs:
   description: Sourcecode Documentation
   url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
diff --git a/.docs/.swagger/api-search.yaml b/.docs/.swagger/api-search.yaml
index 76522bb1b0..0da98c6f1d 100644
--- a/.docs/.swagger/api-search.yaml
+++ b/.docs/.swagger/api-search.yaml
@@ -12,7 +12,7 @@ info:
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0
   title: Database Repository Search Service API
-  version: __TAG__
+  version: __APPVERSION__
 openapi: 3.0.0
 paths:
   /api/search:
diff --git a/.docs/.swagger/api-sidecar.yaml b/.docs/.swagger/api-sidecar.yaml
index 8b62af9d7c..d0b972b18d 100644
--- a/.docs/.swagger/api-sidecar.yaml
+++ b/.docs/.swagger/api-sidecar.yaml
@@ -21,7 +21,7 @@ info:
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0
   title: Database Repository Data Database sidecar API
-  version: __TAG__
+  version: __APPVERSION__
 openapi: 3.0.0
 paths:
   /health:
diff --git a/.docs/.swagger/api-upload.yaml b/.docs/.swagger/api-upload.yaml
index 3145628872..b08342a543 100644
--- a/.docs/.swagger/api-upload.yaml
+++ b/.docs/.swagger/api-upload.yaml
@@ -8,7 +8,7 @@ info:
   license:
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0
-  version: __TAG__
+  version: __APPVERSION__
 externalDocs:
   description: Sourcecode Documentation
   url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services
diff --git a/.docs/system-databases-data.md b/.docs/system-databases-data.md
index b5096f6078..7c31d5e967 100644
--- a/.docs/system-databases-data.md
+++ b/.docs/system-databases-data.md
@@ -15,7 +15,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/data-db-sidecar:__TAG__`](https://hub.docker.com/r/dbrepo/data-db-sidecar)
+    Image: [`dbrepo/data-db-sidecar:__APPVERSION__`](https://hub.docker.com/r/dbrepo/data-db-sidecar)
 
     * Ports: 3305/tcp
     * Swagger UI: `http://<hostname>:1080/swagger-ui/` <a href="../swagger/sidecar" target="_blank">:fontawesome-solid-square-up-right: view online</a>
diff --git a/.docs/system-databases-metadata.md b/.docs/system-databases-metadata.md
index e86ed67e71..4ff9980f25 100644
--- a/.docs/system-databases-metadata.md
+++ b/.docs/system-databases-metadata.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/metadata-db:__TAG__`](https://hub.docker.com/r/dbrepo/metadata-db)
+    Image: [`dbrepo/metadata-db:__APPVERSION__`](https://hub.docker.com/r/dbrepo/metadata-db)
 
     * Ports: 3306/tcp
     * JDBC: `jdbc://mariadb:<hostname>:3306`
diff --git a/.docs/system-databases-search.md b/.docs/system-databases-search.md
index 2761b47c0e..130347215b 100644
--- a/.docs/system-databases-search.md
+++ b/.docs/system-databases-search.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/search-db:__TAG__`](https://hub.docker.com/r/dbrepo/search-db)
+    Image: [`dbrepo/search-db:__APPVERSION__`](https://hub.docker.com/r/dbrepo/search-db)
 
     * Ports: 9200/tcp
 
diff --git a/.docs/system-other-ui.md b/.docs/system-other-ui.md
index d693c6ffbb..955120bb3e 100644
--- a/.docs/system-other-ui.md
+++ b/.docs/system-other-ui.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/ui:__TAG__`](https://hub.docker.com/r/dbrepo/ui)
+    Image: [`dbrepo/ui:__APPVERSION__`](https://hub.docker.com/r/dbrepo/ui)
 
     * Ports: 3000/tcp, 9100/tcp
     * Prometheus: `http://<hostname>:9100/metrics`
@@ -46,7 +46,7 @@ configured as well via the `dbrepo.config.json` values file. The important links
 ```json title="dbrepo.config.json"
 {
   "title": "Database Repository",
-  "version": "__TAG___DOCKER-COMPOSE",
+  "version": "__APPVERSION___DOCKER-COMPOSE",
   "logo": {
     "path": "/my_logo.png"
   },
@@ -65,7 +65,7 @@ if you use a Kubernetes deployment via ConfigMap and Volumes).
 ```yaml title="docker-compose.yml"
 services:
   dbrepo-ui:
-    image: docker.io/dbrepo/ui:__TAG__
+    image: docker.io/dbrepo/ui:__APPVERSION__
     volumes:
       - ./my_logo.png:/app/static/my_logo.png
       - ./dbrepo.conf.json:/app/dbrepo.conf.json
diff --git a/.docs/system-services-analyse.md b/.docs/system-services-analyse.md
index 49857e7dd9..2fb20690b5 100644
--- a/.docs/system-services-analyse.md
+++ b/.docs/system-services-analyse.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/analyse-service:__TAG__`](https://hub.docker.com/r/dbrepo/analyse-service)
+    Image: [`dbrepo/analyse-service:__APPVERSION__`](https://hub.docker.com/r/dbrepo/analyse-service)
 
     * Ports: 5000/tcp
     * Prometheus: `http://<hostname>:5000/metrics`
diff --git a/.docs/system-services-authentication.md b/.docs/system-services-authentication.md
index 20e451ff0c..0f1d32f329 100644
--- a/.docs/system-services-authentication.md
+++ b/.docs/system-services-authentication.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/authentication-service:__TAG__`](https://hub.docker.com/r/dbrepo/authentication-service)
+    Image: [`dbrepo/authentication-service:__APPVERSION__`](https://hub.docker.com/r/dbrepo/authentication-service)
 
     * Ports: 8080/tcp
     * Health: `http://<hostname>:8080/api/auth/health`
diff --git a/.docs/system-services-data.md b/.docs/system-services-data.md
index 902f216900..b8a1fe6263 100644
--- a/.docs/system-services-data.md
+++ b/.docs/system-services-data.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/data-service:__TAG__`](https://hub.docker.com/r/dbrepo/data-service)
+    Image: [`dbrepo/data-service:__APPVERSION__`](https://hub.docker.com/r/dbrepo/data-service)
 
     * Ports: 9093/tcp
     * Info: `http://<hostname>:9093/actuator/info`
diff --git a/.docs/system-services-metadata.md b/.docs/system-services-metadata.md
index b564925b70..5c0e1d5200 100644
--- a/.docs/system-services-metadata.md
+++ b/.docs/system-services-metadata.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/metadata-service:__TAG__`](https://hub.docker.com/r/dbrepo/metadata-service)
+    Image: [`dbrepo/metadata-service:__APPVERSION__`](https://hub.docker.com/r/dbrepo/metadata-service)
 
     * Ports: 9099/tcp
     * Info: `http://<hostname>:9099/actuator/info`
diff --git a/.docs/system-services-search.md b/.docs/system-services-search.md
index deda610d4a..85bba96e9f 100644
--- a/.docs/system-services-search.md
+++ b/.docs/system-services-search.md
@@ -8,7 +8,7 @@ author: Martin Weise
 
 !!! debug "Debug Information"
 
-    Image: [`dbrepo/search-service:__TAG__`](https://hub.docker.com/r/dbrepo/search-service)
+    Image: [`dbrepo/search-service:__APPVERSION__`](https://hub.docker.com/r/dbrepo/search-service)
 
     * Ports: 4000/tcp
     * Health: `http://<hostname>:4000/api/search/health`
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e54193d739..f43d660740 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,5 @@
 variables:
   HOSTALIASES: ./hosts
-  TAG: "${TAG:-latest}"
   TRIVY_NO_PROGRESS: "true"
   TRIVY_CACHE_DIR: ".trivycache/"
   DOCKER_HOST: "unix:///var/run/dind/docker.sock"
@@ -549,7 +548,7 @@ build-api-latest:
     - apk add bash git
     - git fetch && git checkout master
     - bash .docs/.swagger/swagger-site.sh
-    - find ./site -type f -exec sed -i -e "s/__TAG__/latest/g" {} \;
+    - find ./site -type f -exec sed -i -e "s/__APPVERSION__/latest/g" {} \;
     - mkdir -p ./swagger/latest
     - cp -r ./site/* ./swagger/latest/
   cache:
@@ -596,7 +595,7 @@ build-api-1.4:
     - apk add bash git maven
     - git fetch && git checkout release-v1.4
     - bash .docs/.swagger/swagger-site.sh
-    - find ./site -type f -exec sed -i -e "s/__TAG__/${APP_VERSION}/g" {} \;
+    - find ./site -type f -exec sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" {} \;
     - mkdir -p ./swagger/${APP_VERSION}
     - cp -r ./site/* ./swagger/${APP_VERSION}/
   cache:
@@ -645,8 +644,7 @@ docs-latest:
     - git fetch && git checkout master
     - pip install -r ./requirements.txt
     - mkdir -p ./final/{latest,1.3}
-    - find . -type f -exec sed -i -e "s/__TAG__/latest/g" {} \;
-    - find . -type f -exec sed -i -e "s/__APPVERSION__/latest/g" {} \;
+    - find .docs/ -type f -exec sed -i -e "s/__APPVERSION__/latest/g" {} \;
     - mkdocs build && cp -r ./site ./final/latest
     - cp ./.docs/redirect.html ./final/index.html
     - cp ./.docs/redirect.html ./final/1.3/index.html
@@ -706,8 +704,7 @@ docs-1.4:
     - pip install -r ./.docs/requirements.txt
     - wget https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/.docs/overrides/main.html -O .docs/overrides/main.html -q
     - mkdir -p ./final
-    - find . -type f -exec sed -i -e "s/__TAG__/${APP_VERSION}/g" {} \;
-    - find . -type f -exec sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" {} \;
+    - find .docs/ -type f -exec sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" {} \;
     - mkdocs build && cp -r ./site ./final/${APP_VERSION}
     - cp -r ./swagger/${APP_VERSION} ./final/${APP_VERSION}/swagger
   cache:
diff --git a/dbrepo-analyse-service/app.py b/dbrepo-analyse-service/app.py
index d2d666b14d..792a8240f8 100644
--- a/dbrepo-analyse-service/app.py
+++ b/dbrepo-analyse-service/app.py
@@ -80,7 +80,7 @@ template = {
     "info": {
         "title": "Database Repository Analyse Service API",
         "description": "Service that analyses data structures",
-        "version": "__TAG__",
+        "version": "__APPVERSION__",
         "contact": {
             "name": "Prof. Andreas Rauber",
             "email": "andreas.rauber@tuwien.ac.at",
diff --git a/dbrepo-data-db/sidecar/app.py b/dbrepo-data-db/sidecar/app.py
index 82c409dca8..802a17b3b5 100644
--- a/dbrepo-data-db/sidecar/app.py
+++ b/dbrepo-data-db/sidecar/app.py
@@ -61,7 +61,7 @@ template = {
     "info": {
         "title": "Database Repository Data Database sidecar API",
         "description": "Sidecar that downloads the import .csv file",
-        "version": "__TAG__",
+        "version": "__APPVERSION__",
         "contact": {
             "name": "Prof. Andreas Rauber",
             "email": "andreas.rauber@tuwien.ac.at"
diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java
index 0d9df429c1..f7b33979a7 100644
--- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java
+++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java
@@ -24,7 +24,7 @@ public class SwaggerConfig {
                                 .name("Prof. Andreas Rauber")
                                 .email("andreas.rauber@tuwien.ac.at"))
                         .description("Service that manages the data")
-                        .version("__TAG__")
+                        .version("__APPVERSION__")
                         .license(new License()
                                 .name("Apache 2.0")
                                 .url("https://www.apache.org/licenses/LICENSE-2.0")))
diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java
index 4354c5c374..8aa287f9fd 100644
--- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java
+++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java
@@ -24,7 +24,7 @@ public class SwaggerConfig {
                                 .name("Prof. Andreas Rauber")
                                 .email("andreas.rauber@tuwien.ac.at"))
                         .description("Service that manages the metadata")
-                        .version("__TAG__")
+                        .version("__APPVERSION__")
                         .license(new License()
                                 .name("Apache 2.0")
                                 .url("https://www.apache.org/licenses/LICENSE-2.0")))
diff --git a/dbrepo-search-service/app/__init__.py b/dbrepo-search-service/app/__init__.py
index 51e42b19a9..e090b89e1d 100644
--- a/dbrepo-search-service/app/__init__.py
+++ b/dbrepo-search-service/app/__init__.py
@@ -66,7 +66,7 @@ def create_app(config_class=Config):
         "info": {
             "title": "Database Repository Search Service API",
             "description": "Service that searches the search database",
-            "version": "__TAG__",
+            "version": "latest",
             "contact": {
                 "name": "Prof. Andreas Rauber",
                 "email": "andreas.rauber@tuwien.ac.at"
-- 
GitLab