diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1690c3c91a238fd5469b4a2ebd3c8024d9becb24..676d1f32d2f59508cc9b04b528b6f5fbf0ea4454 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,8 @@ cta_rpm:
   script:
     - cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/*.repo /etc/yum.repos.d/
     - yum install -y gcc-c++ cmake make rpm-build
-    - yum -y install yum-plugin-priorities
+    - yum -y install yum-plugin-priorities yum-plugin-versionlock
+    - cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/
     - yum-builddep --nogpgcheck -y build_srpm/RPM/SRPMS/*
     - mkdir build_rpm
     - cd build_rpm
diff --git a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo
index 26b53192fedd96c5a1c4963217b332eff49f7256..2b4bc73103ca9b8b811f7ca1e25692a7d93dbf88 100644
--- a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo
+++ b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/castor.repo
@@ -1,6 +1,7 @@
 [castor]
 name=CASTOR Repositories in LINUXSOFT
 baseurl=http://linuxsoft.cern.ch/internal/repos/castor7-testing/$basearch/os
+protected=1
+priority=2
 enabled=0
 gpgcheck=0
-priority=2
diff --git a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
index 60860de5ce4c417c3f2169d718826a3c0914a370..2750dcc9b89a120330b8a2700bfc5d76ee69ab58 100644
--- a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
+++ b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
@@ -1,6 +1,7 @@
 [cta-ci-castor]
 name=CTA CI repo castor cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/castor/
+protected=1
 priority=2
 gpgcheck=0
 enabled=1
@@ -8,6 +9,7 @@ enabled=1
 [cta-ci-ceph]
 name=CTA CI repo ceph cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/ceph/
+protected=1
 priority=3
 gpgcheck=0
 enabled=1
@@ -15,6 +17,7 @@ enabled=1
 [cta-ci-eos]
 name=CTA CI repo eos cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/eos/
+protected=1
 priority=4
 gpgcheck=0
 enabled=1
@@ -22,6 +25,7 @@ enabled=1
 [cta-ci-others]
 name=CTA CI repo any additional needed RPM cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/others/
+protected=1
 priority=4
 gpgcheck=0
 enabled=1
@@ -29,6 +33,7 @@ enabled=1
 [cta-ci-xroot]
 name=CTA CI repo xroot cache
 baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/xroot/
+protected=1
 priority=4
 gpgcheck=0
 enabled=1
diff --git a/continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list b/continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list
index dbf1ebc4edbd2f611ee77586c77855a8831c5719..01377af027c4dae84afc0f6d25189f3092410096 100644
--- a/continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list
+++ b/continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list
@@ -11,12 +11,20 @@
 0:eos-testkeytab-4.1.26-20170824172038gitc7cf4c6.el7.cern.x86_64
 1:xrootd-4.7.0-1.el7.x86_64
 1:xrootd-client-4.7.0-1.el7.x86_64
+1:xrootd-client-devel-4.7.0-1.el7.x86_64
 1:xrootd-client-libs-4.7.0-1.el7.x86_64
 1:xrootd-debuginfo-4.7.0-1.el7.x86_64
+1:xrootd-devel-4.7.0-1.el7.x86_64
+1:xrootd-doc-4.7.0-1.el7.noarch
+1:xrootd-fuse-4.7.0-1.el7.x86_64
 1:xrootd-libs-4.7.0-1.el7.x86_64
+1:xrootd-private-devel-4.7.0-1.el7.x86_64
+1:xrootd-python-4.7.0-1.el7.x86_64
 1:xrootd-selinux-4.7.0-1.el7.noarch
 1:xrootd-server-4.7.0-1.el7.x86_64
+1:xrootd-server-devel-4.7.0-1.el7.x86_64
 1:xrootd-server-libs-4.7.0-1.el7.x86_64
+1:xrootd-tests-4.7.0-1.el7.x86_64
 1:ceph-11.0.0-2590.g08becd3.el7.cern.x86_64
 1:ceph-base-11.0.0-2590.g08becd3.el7.cern.x86_64
 1:ceph-common-11.0.0-2590.g08becd3.el7.cern.x86_64