diff --git a/templates/gitlab-ci.yml b/templates/gitlab-ci.yml
index ba4c97c75af072e3340cd9a58415e8a1ce4e478d..01f6671ee997c0e426d2cdfa27625549e23fa72f 100644
--- a/templates/gitlab-ci.yml
+++ b/templates/gitlab-ci.yml
@@ -1,11 +1,8 @@
 # This build file uses template features from YAML so it is generic enough for
 # any Bob project. Don't modify it unless you know what you're doing.
 
-# global variables
 variables:
-  CONDA_ENVS_PATH: "conda-env"
-  CONDA_BLD_PATH: "conda-env"
-
+  CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"
 
 # Definition of our build pipeline order
 stages:
@@ -18,60 +15,60 @@ stages:
 .build_template: &build_job
   stage: build
   before_script:
-    - export PATH=$CONDA_FOLDER/bin:$PATH
     - mkdir _ci
     - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/condapackage/gitlab/install.sh" > _ci/install.sh
     - chmod 755 _ci/install.sh
     - ./_ci/install.sh _ci condapackage #installs ci support scripts
     - ./_ci/before_build.sh
-  variables: &build_variables
-    CONDA_FOLDER: "${CI_PROJECT_DIR}/${CONDA_ENVS_PATH}"
   script:
     - ./_ci/build.sh
+  cache: &build_caches
+    paths:
+      - miniconda.sh
+      - ${CONDA_ROOT}/pkgs/*.tar.bz2
+      - ${CONDA_ROOT}/pkgs/urls.txt
+
 
 .build_linux_template: &linux_build_job
   <<: *build_job
+  tags:
+    - docker
+  image: continuumio/conda-concourse-ci
   artifacts:
     expire_in: 1 week
     paths:
       - _ci/
-      - ${CONDA_ENVS_PATH}/linux-64/*.tar.bz2
-  tags:
-    - docker
-  image: continuumio/conda-concourse-ci
+      - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
   cache:
+    <<: *build_caches
     key: "linux-cache"
-    paths:
-      - ${CONDA_ENVS_PATH}/.pkgs/*.tar.bz2
-      - ${CONDA_ENVS_PATH}/.pkgs/urls.txt
+
 
 .build_macosx_template: &macosx_build_job
   <<: *build_job
+  tags:
+    - macosx
   artifacts:
     expire_in: 1 week
     paths:
       - _ci/
-      - ${CONDA_ENVS_PATH}/osx-64/*.tar.bz2
-  tags:
-    - macosx
+      - ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2
   cache:
+    <<: *build_caches
     key: "macosx-cache"
-    paths:
-      - miniconda.sh
-      - ${CONDA_ENVS_PATH}/pkgs/*.tar.bz2
-      - ${CONDA_ENVS_PATH}/pkgs/urls.txt
 
 
 build_linux_27:
   <<: *linux_build_job
   variables:
-    <<: *linux_variables
+    <<: *build_variables
     PYTHON_VERSION: "2.7"
 
+
 build_linux_36:
   <<: *linux_build_job
   variables:
-    <<: *linux_variables
+    <<: *build_variables
     PYTHON_VERSION: "3.6"
     BUILD_EGG: "true"
   artifacts:
@@ -80,7 +77,8 @@ build_linux_36:
       - _ci/
       - dist/*.zip
       - sphinx
-      - ${CONDA_ENVS_PATH}/linux-64/*.tar.bz2
+      - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
+
 
 build_macosx_27:
   <<: *macosx_build_job
@@ -88,6 +86,7 @@ build_macosx_27:
     <<: *build_variables
     PYTHON_VERSION: "2.7"
 
+
 build_macosx_36:
   <<: *macosx_build_job
   variables:
@@ -110,6 +109,7 @@ build_macosx_36:
   tags:
     - deployer
 
+
 deploy_beta:
   <<: *deploy_job
   environment: beta
@@ -117,6 +117,7 @@ deploy_beta:
     - master
     - condapackage
 
+
 deploy_stable:
   <<: *deploy_job
   environment: stable