diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 32a89f8209b1e8ffae2c02233b924cc80a0cec71..52ee4122e6f613009334f57ce6e2c584a522333f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,14 +18,11 @@ stages:
     - release
 
 
-before_script:
-    - yum install -y epel-release
-    - yum install -y python-pip python-devel
-    - _CWD=$(pwd) && cd /usr/local/root && source bin/thisroot.sh && cd $_CWD
-    - source /Jpp/setenv.sh /Jpp
-
-
 .virtualenv_template: &virtualenv_definition |
+  yum install -y epel-release
+  yum install -y python-pip python-devel
+  _CWD=$(pwd) && cd /usr/local/root && source bin/thisroot.sh && cd $_CWD
+  source /Jpp/setenv.sh /Jpp
   python -V
   pip install -U pip setuptools wheel
   pip install virtualenv