X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fengine%2Fscripts%2Fdeploy.sh;h=0302e776a54db534f8d2d24b9257af59022c0b3e;hb=6cd44a7fea816effd76c19fd95ea7cdcf21c1536;hp=abd2414742b2fef1d4ee96e3919696573355576b;hpb=5db1c8f0c5590b4030dc33ee259927782dabae6b;p=infra%2Fcicd.git diff --git a/jjb/engine/scripts/deploy.sh b/jjb/engine/scripts/deploy.sh index abd24147..0302e776 100755 --- a/jjb/engine/scripts/deploy.sh +++ b/jjb/engine/scripts/deploy.sh @@ -31,6 +31,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