Initialize ERROR_ON_CLONE flag in grenaderc

A user can set ERROR_ON_CLONE to yes (true) to fail a run if a git
clone fails.  This patch will document that behavior in grenaderc
and set the flag to its default value of no (unless a user overrides).

Change-Id: I1b1f80b00b4a4838ef10241306d9190520a93701
This commit is contained in:
Steve Heyman 2017-01-25 21:15:09 -06:00
parent 489202bd70
commit 6846c59845
2 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,10 @@ ENABLE_TEMPEST=${ENABLE_TEMPEST:-True}
# We need RECLONE to get the updated branches; not everyone wants it though
RECLONE=${RECLONE:-no}
# Set this to True if you want to abort execution with an error if a git repo
# does not exist
ERROR_ON_CLONE=${ERROR_ON_CLONE:-False}
# Allow only running parts of this script
RUN_BASE=${RUN_BASE:-True}
RUN_TARGET=${RUN_TARGET:-True}

View File

@ -106,6 +106,8 @@ function git_clone {
local git_clone_flags=""
RECLONE=$(trueorfalse False RECLONE)
ERROR_ON_CLONE=$(trueorfalse False ERROR_ON_CLONE)
if [[ "${GIT_DEPTH}" -gt 0 ]]; then
git_clone_flags="$git_clone_flags --depth $GIT_DEPTH"
fi