docker_build_centos7 sometimes silently fails to install Git
I’ve had times when the centos7-cmake-build CI job would fail mysteriously unable to find Git:
+ cmake --log-level=VERBOSE --warn-uninitialized -Werror=dev ..
Warn about uninitialized values.
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found BISON: /usr/bin/bison (found suitable version "3.0.4", minimum required is "3.0")
-- Found FLEX: /usr/bin/flex (found version "2.5.37")
CMake Error at CMakeLists.txt:55 (message):
git not found
I could never quite figure out what was going on as prior dependent jobs succeeded. There were legitimate failures (like the one referenced in b22d738c), but beyond that the Docker preparation jobs seemed to always succeed. I dug further into one of the failures today and I think discovered the reason:
#7 118.4 Cannot open: https://repo.ius.io/ius-release-el7.rpm. Skipping.
So for some reason, when yum
can’t reach EPEL, it just skips installing Git. I don’t know yet if this is a side effect of -y
or something else we are doing. If we can’t figure out what’s going on, maybe we could at a git --version
to the bottom of ci/centos7/Dockerfile to at least loudly fail the Docker job if Git fails to install.
Logs below.