diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8fb90d76eb2d572d1943e5cea1241261f1248276..a4f1f85ffe56be1d4945209cc0583c3f86ea9da9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -210,6 +210,7 @@ cert:
   tags: [docker]
   stage: cert
   image: $CI_REGISTRY_IMAGE
+  needs: [build-testenv]
   artifacts:
     paths:
       - .docker/cert/
@@ -217,10 +218,12 @@ cert:
   script:
       - cd .docker
       - CAOSHOSTNAME=caosdb-server ./cert.sh
+
 style:
   tags: [docker]
   stage: style
   image: $CI_REGISTRY_IMAGE
+  needs: []
   script:
       - autopep8 -r --diff --exit-code .
   allow_failure: true