diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 04935198e3c6fee3a88a8435d5f1438c449b54b6..ef69ca139cc0c9104c8c4d28f2b30203629ced98 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,20 +4,19 @@ default:
     - docker:dind
   before_script:
     - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-    - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
   interruptible: true
 
-variables:
-  - SECURE_FILES_DOWNLOAD_PATH='.secure'
-
 stages:
   - pre-build
   - build
 
 get-credentials:
   stage: pre-build
+  variables:
+  - SECURE_FILES_DOWNLOAD_PATH: '.secure'
   script:
     - echo "Copying secure file with FeBio login ..."
+    - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
     - export USERNAME=$(grep 'username:' ${SECURE_FILE_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
     - export PASSWORD=$(grep 'password:' ${SECURE_FILE_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
     - echo "Extracted username $USERNAME"