Pass dlrn_hash from the releases file

Now that the dlrn hash is differenciate per upgrade step, we can
pass it directly to the playbook.

Apart from dlrn_hash we need to pash get_build_command to ensure that
the hash traverse all the logic [1]
[1] https://github.com/openstack/tripleo-quickstart-extras/blob/master/roles/overcloud-prep-containers/templates/overcloud-prep-containers.sh.j2#L30-L45

Change-Id: I658f09b531e9659c192eeede6cdebf392c4d8281
This commit is contained in:
Enrique Llorente 2018-05-22 13:08:23 +02:00 committed by John Trowbridge
parent 48e2b054e7
commit b30a1195fc
1 changed files with 22 additions and 16 deletions

View File

@ -62,31 +62,37 @@ export QUICKSTART_DEFAULT_RELEASE_ARG="--extra-vars @$LOCAL_WORKING_DIR/config/r
declare -A RELEASE_ARGS=()
get_extra_vars_from_release()
{
local release_name=$1
local release_hash=$2
local release_file=$LOCAL_WORKING_DIR/config/release/tripleo-ci/$release_name.yml
echo "--extra-vars @$release_file -e dlrn_hash=$release_hash -e get_build_command=$release_hash"
}
if [[ -f "$RELEASES_FILE_OUTPUT" ]]; then
source $RELEASES_FILE_OUTPUT
declare -A RELEASE_ARGS=(
["multinode-undercloud.yml"]="--extra-vars
@$LOCAL_WORKING_DIR/config/release/tripleo-ci/$UNDERCLOUD_INSTALL_RELEASE.yml"
["multinode-undercloud-upgrade.yml"]="--extra-vars
@$LOCAL_WORKING_DIR/config/release/tripleo-ci/$UNDERCLOUD_TARGET_RELEASE.yml"
["multinode-overcloud-prep.yml"]="--extra-vars
@$LOCAL_WORKING_DIR/config/release/tripleo-ci/$OVERCLOUD_DEPLOY_RELEASE.yml"
["multinode-overcloud.yml"]="--extra-vars
@$LOCAL_WORKING_DIR/config/release/tripleo-ci/$OVERCLOUD_DEPLOY_RELEASE.yml"
["multinode-overcloud-update.yml"]="--extra-vars
@$LOCAL_WORKING_DIR/config/release/tripleo-ci/$OVERCLOUD_DEPLOY_RELEASE.yml"
["multinode-overcloud-upgrade.yml"]="--extra-vars
@$LOCAL_WORKING_DIR/config/release/tripleo-ci/$OVERCLOUD_TARGET_RELEASE.yml"
["multinode-validate.yml"]="--extra-vars
@$LOCAL_WORKING_DIR/config/release/tripleo-ci/$OVERCLOUD_TARGET_RELEASE.yml"
["multinode-undercloud.yml"]=$(get_extra_vars_from_release \
$UNDERCLOUD_INSTALL_RELEASE $UNDERCLOUD_INSTALL_HASH)
["multinode-undercloud-upgrade.yml"]=$(get_extra_vars_from_release \
$UNDERCLOUD_TARGET_RELEASE $UNDERCLOUD_TARGET_HASH)
["multinode-overcloud-prep.yml"]=$(get_extra_vars_from_release \
$OVERCLOUD_DEPLOY_RELEASE $OVERCLOUD_DEPLOY_HASH)
["multinode-overcloud.yml"]=$(get_extra_vars_from_release \
$OVERCLOUD_DEPLOY_RELEASE $OVERCLOUD_DEPLOY_HASH)
["multinode-overcloud-update.yml"]=$(get_extra_vars_from_release \
$OVERCLOUD_DEPLOY_RELEASE $OVERCLOUD_DEPLOY_HASH)
["multinode-overcloud-upgrade.yml"]=$(get_extra_vars_from_release \
$OVERCLOUD_TARGET_RELEASE $OVERCLOUD_TARGET_HASH)
["multinode-validate.yml"]=$(get_extra_vars_from_release \
$OVERCLOUD_TARGET_RELEASE $OVERCLOUD_TARGET_HASH)
)
fi
declare -A PLAYBOOKS_ARGS=(
["baremetal-full-overcloud.yml"]=" --extra-vars validation_args='--validation-errors-nonfatal' "
["multinode-undercloud-upgrade.yml"]=" --extra-vars @$LOCAL_WORKING_DIR/config/release/tripleo-ci/${UPGRADE_RELEASE:-$QUICKSTART_RELEASE}.yml"