diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ed9b2c48ee5c387d3998f7447eb9e4201c946f2c..609009d00a4eb24fdeb45059b0e6b72b0ee4092c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -83,11 +83,12 @@ test:
 # Deploy: Trigger building of server image and integration tests
 trigger_inttest:
   stage: deploy
-  needs: [ ]
+  needs: [ test ]
   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