X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fengine%2Fscripts%2Fdeploy.sh;h=1f0f7b16118446f07c771a0bc876e733e6616284;hb=24eaec5b71aa5f80e147731d7204c86f0dbd4a2b;hp=d52bbfa5d8c748613be62577fa0f11acd679ad11;hpb=de51df03efb9fc0cfc2d0ca5c757727c6c6c044e;p=infra%2Fcicd.git diff --git a/jjb/engine/scripts/deploy.sh b/jjb/engine/scripts/deploy.sh index d52bbfa5..1f0f7b16 100755 --- a/jjb/engine/scripts/deploy.sh +++ b/jjb/engine/scripts/deploy.sh @@ -18,7 +18,6 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= -set -o nounset set -o errexit set -o pipefail @@ -31,6 +30,14 @@ if [[ "$GERRIT_PROJECT" != "infra/engine" ]]; then cd "$WORKSPACE" fi +# NOTE (fdegir): this variable is set by generate-change-metadata.sh script +# if a dependency to engine repo is determined so we check out that refspec +# to ensure we respect the dependency +if [[ ! -z "${NORDIX_ENGINE_REFSPEC+x}" ]]; then + echo "Info : Fetching dependent change ${NORDIX_ENGINE_REFSPEC} infra/engine" + git fetch "https://gerrit.nordix.org/infra/engine" ${NORDIX_ENGINE_REFSPEC} && git checkout FETCH_HEAD +fi + if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then ENGINE_ROOT_DIR="/opt/engine/offline/git/engine" else @@ -44,6 +51,10 @@ HEAT_ENVIRONMENT_FILENAME=${HEAT_ENVIRONMENT_FILENAME:-/tmp/heat} /bin/cp -f $OPENRC_FILE /tmp/openrc cd "$ENGINE_ROOT_DIR/engine" -./deploy.sh -s "$STACK_TYPE" -b "$STACK_VERSION" -p "$PDF" -i "$IDF" -o /tmp/openrc -d "$DISTRO" -v +./deploy.sh -s "$STACK_TYPE" -b "$STACK_VERSION" -c "$DEPLOY_SCENARIO" -p "$PDF" -i "$IDF" -o /tmp/openrc -d "$DISTRO" -v + +# NOTE (fdegir): we need inventory.ini for test execution +/bin/rm -f /tmp/inventory.ini +/bin/cp -f /opt/engine/.cache/config/inventory.ini /tmp/inventory.ini # vim: set ts=2 sw=2 expandtab: