export NEW_HASH=`curl $DELOREAN_URL | grep baseurl | awk -F '/' '{ print $5"/"$6"/"$7 }'`
export OLD_HASH=`curl $LAST_PROMOTED_URL | grep baseurl | awk -F '/' '{ print $5"/"$6"/"$7 }'`

# No need to run the whole promote pipeline if there is nothing new to promote
if [ $OLD_HASH == $NEW_HASH ]; then
    exit 23
fi

echo "delorean_current_hash = $NEW_HASH" > $HASH_FILE
export NEW_HASH=`curl $DELOREAN_URL | grep baseurl | awk -F '/' '{ print $5"/"$6"/"$7 }'`
export OLD_HASH=`curl $LAST_PROMOTED_URL | grep baseurl | awk -F '/' '{ print $5"/"$6"/"$7 }'`

# No need to run the whole promote pipeline if there is nothing new to promote
if [ $OLD_HASH == $NEW_HASH ]; then
    exit 23
fi

echo "delorean_current_hash = $NEW_HASH" > $HASH_FILE

# This is needed to make the promote image building job runnable outside of CI in the
# same way as the other tripleo-quickstart jobs.
echo "PUBLISH = true" >> $HASH_FILE


Add a PUBLISH variable to the get promote hash script
Add a PUBLISH variable to the get promote hash script

The only tripleo-quickstart job that is difficult to reproduce
outside of CI is the promote image building job. This is because
at the end of that job, it tries to upload images to the CentOS
artifacts server. We can control that behavior via a PUBLISH
variable, but in order to make sure it is only set to true when
running in CI, it is cleanest to set it in the promote hash file.

Change-Id: I84c5c4f983b8d5d8423413a302048e80951120ee
