diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c2de130bd802f9bd3be3d9f0e91a53a74401225b..609009d00a4eb24fdeb45059b0e6b72b0ee4092c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,8 +3,10 @@
 #
 # Copyright (C) 2018 Research Group Biomedical Physics,
 # Max-Planck-Institute for Dynamics and Self-Organization Göttingen
+# Copyright (C) 2019-2022 Indiscale GmbH <info@indiscale.com>
 # Copyright (C) 2019 Henrik tom Wörden
 # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
+# Copyright (C) 2020-2022 Daniel Hornung <d.hornung@indiscale.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as
@@ -25,8 +27,6 @@ variables:
   CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-server/caosdb-server-testenv:latest
   GIT_SUBMODULE_STRATEGY: normal
 
-  DEPLOY_PIPELINE: https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
-
   ## FOR DEBUGGING
   TRIGGERED_BY_REPO: SERVER
   TRIGGERED_BY_REF: $CI_COMMIT_REF_NAME
@@ -39,16 +39,13 @@ stages:
   - test
   - deploy
 
-.env: &env
-  - F_BRANCH="${CI_COMMIT_REF_NAME}"
-
 info:
   tags: [cached-dind]
   image: docker:20.10
   stage: info
   needs: []
   script:
-    - *env
+    - F_BRANCH="${CI_COMMIT_REF_NAME}"
     - echo "Pipeline triggered by $TRIGGERED_BY_REPO@$TRIGGERED_BY_REF ($TRIGGERED_BY_HASH)"
     - echo "Pipeline will trigger DEPLOY with branch $DEPLOY_REF"
     - echo "F_BRANCH = $F_BRANCH"
@@ -83,25 +80,26 @@ test:
     - mvn compile
     - mvn test
 
-
-
 # Deploy: Trigger building of server image and integration tests
-trigger_build:
-  tags: [ docker ]
+trigger_inttest:
   stage: deploy
   needs: [ test ]
-  script:
-    - *env
-
-    - echo "Triggering pipeline ${DEPLOY_PIPELINE}@${DEPLOY_REF} with F_BRANCH=${F_BRANCH}"
-    - /usr/bin/curl -X POST
-      -F token=$CI_JOB_TOKEN
-      -F "variables[SERVER]=$CI_COMMIT_REF_NAME"
-      -F "variables[F_BRANCH]=$F_BRANCH"
-      -F "variables[TRIGGERED_BY_REPO]=$TRIGGERED_BY_REPO"
-      -F "variables[TRIGGERED_BY_REF]=$TRIGGERED_BY_REF"
-      -F "variables[TRIGGERED_BY_HASH]=$TRIGGERED_BY_HASH"
-      -F ref=$DEPLOY_REF $DEPLOY_PIPELINE
+  inherit:
+    variables:
+      # List the variables that shall be inherited, which also means they will override any equally
+      # named varibles in child pipelines.
+      - DEPLOY_REF
+      - TRIGGERED_BY_REPO
+      - TRIGGERED_BY_REF
+      - TRIGGERED_BY_HASH
+  variables:
+    # Renaming variables.
+    F_BRANCH: $CI_COMMIT_REF_NAME
+    SERVER: $CI_COMMIT_REF_NAME
+  trigger:
+    project: caosdb/src/caosdb-deploy
+    branch: $DEPLOY_REF
+    strategy: depend
 
 # Build the sphinx documentation and make it ready for deployment by Gitlab Pages
 # Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages
diff --git a/src/doc/roles.md b/src/doc/roles.md
index 2d1d36c47c34658a306384e39033f7ea4e5eb040..138c75d37df7b883d1e494a438283f1a610f07c3 100644
--- a/src/doc/roles.md
+++ b/src/doc/roles.md
@@ -10,7 +10,7 @@ users may have the same role, and there may be roles without any users.
 
 The user and their roles are always returned by the server in answers to requests
 and can thus be interpreted and used by clients.  The most important use though
-is [permission](doc:`permissions`) checking in the server: Access and
+is [permission](permissions.rst) checking in the server: Access and
 modification of
 entities can be controlled via roles, so that users of a given role are allowed
 or denied certain actions.  Incidentally, the permission to edit the permissions
@@ -32,4 +32,4 @@ There are some special roles, which are automatically assigned to users:
 
 Except for the `anonymous` role, these special roles are not returned by the
 server, but can nevertheless be used to define
-[permissions](doc:`permissions`).
+[permissions](permissions.rst).