Browse code

Merge "Add option to skip EPEL & other repo installs"

Jenkins authored on 2016/01/04 22:02:00
Showing 1 changed files
... ...
@@ -266,9 +266,7 @@ fi
266 266
 # Some distros need to add repos beyond the defaults provided by the vendor
267 267
 # to pick up required packages.
268 268
 
269
-if is_fedora && [[ $DISTRO == "rhel7" ]]; then
270
-    # RHEL requires EPEL for many Open Stack dependencies
271
-
269
+function _install_epel_and_rdo {
272 270
     # NOTE: We always remove and install latest -- some environments
273 271
     # use snapshot images, and if EPEL version updates they break
274 272
     # unless we update them to latest version.
... ...
@@ -298,18 +296,27 @@ EOF
298 298
     sudo yum-config-manager --enable epel-bootstrap
299 299
     yum_install epel-release || \
300 300
         die $LINENO "Error installing EPEL repo, cannot continue"
301
-    # EPEL rpm has installed it's version
302 301
     sudo rm -f /etc/yum.repos.d/epel-bootstrap.repo
303 302
 
304 303
     # ... and also optional to be enabled
305 304
     sudo yum-config-manager --enable rhel-7-server-optional-rpms
306 305
 
306
+    # install the lastest RDO
307 307
     sudo yum install -y https://rdoproject.org/repos/rdo-release.rpm
308 308
 
309 309
     if is_oraclelinux; then
310 310
         sudo yum-config-manager --enable ol7_optional_latest ol7_addons ol7_MySQL56
311 311
     fi
312
+}
313
+
314
+# If you have all the repos installed above already setup (e.g. a CI
315
+# situation where they are on your image) you may choose to skip this
316
+# to speed things up
317
+SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
312 318
 
319
+if is_fedora && [[ $DISTRO == "rhel7" ]] && \
320
+        [[ ${SKIP_EPEL_INSTALL} != True ]]; then
321
+    _install_epel_and_rdo
313 322
 fi
314 323
 
315 324