From c754d504cb3825ab00fe82cf40b2352d21818bda Mon Sep 17 00:00:00 2001 From: Lauren Perry Date: Fri, 9 Jan 2015 16:43:40 +0000 Subject: Obtain Gerrit user identity and Gerrit URL from firehose.morph during deployment, rather than hardcoding values, and remove changing of git identity, which is now also set in firehose.morph --- firehose.configure | 33 ++++++++++++++++++++++++++------- firehose.sh | 2 +- firehose/plugin/firehose_plugin.py | 24 +++++++++--------------- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/firehose.configure b/firehose.configure index c17fe59..27a5fe6 100644 --- a/firehose.configure +++ b/firehose.configure @@ -3,7 +3,7 @@ set -e ROOT="$1" -# Clone the Firehose repo +# Clone the Firehose repo (temporary hack) git clone git://git.baserock.org/baserock/baserock/firehose # Move Firehose arguments to specific directory and timer/service @@ -28,13 +28,32 @@ systemctl enable firehose.timer systemctl start firehose.timer systemctl enable firehose.service +# Check necessary parameters were filled in firehose.morph before +# the system was deployed, and exit if not +if + [ -z "$GERRIT_USERNAME" -a \ + -z "$GERRIT_URL" -a \ + -z "$GIT_USERNAME" -a \ + -z "$GIT_EMAIL" -a]; then + exit 0 +fi + +# Create firehose.conf to store parameters obtained from .morph file +cat >>"$ROOT"/etc/firehose.conf <