echo "Info : Processing change $DEPENDENT_CHANGE_ID"
declare -a DEPENDENT_CHANGE_METADATA
- readarray -t DEPENDENT_CHANGE_METADATA < <(curl -s "https://gerrit.nordix.org/changes/?q=$DEPENDENT_CHANGE_ID&o=CURRENT_REVISION" 2>&1 \
- | grep "project\|status\|current_revision\|ref\".*," | sed -e 's/\s//g' -e 's/,//g' -e 's/"//g'| cut -d: -f2)
+ # NOTE (cian): upgrades to Gerrit appear to change the output of the previously-used endpoint
+ # https://gerrit.nordix.org/changes/?q=$DEPENDENT_CHANGE_ID&o=CURRENT_REVISION so moving to
+ # gerrit SSH-based queries instead
+ GIT_BASE_SSH_CMD=$(echo "${GIT_BASE_SSH}" | sed -e 's#://# #g' | sed -e 's#:# -p #g')
+ readarray -t DEPENDENT_CHANGE_METADATA < <(
+ ${GIT_BASE_SSH_CMD} gerrit query --format=json change:${DEPENDENT_CHANGE_ID} --current-patch-set |\
+ head -1 |\
+ jq -r '[.project, .status, .currentPatchSet.revision, .currentPatchSet.ref] | join("\n")'
+ )
# NOTE (fdegir): check if the dependeny change exists
# and ignore if it doesn't
CI_LOOP=$CI_LOOP
ENGINE_SHA=$(git rev-parse HEAD)
OFFLINE_INSTALLER_FILE=$OFFLINE_INSTALLER_FILE
+OFFLINE_XTESTING_FILE=$OFFLINE_XTESTING_FILE
BUILD_ARTIFACTS=$BUILD_ARTIFACTS
NORDIX_ARM_REPO=nordix-${STACK_TYPE}
NORDIX_ARTIFACT_URL=$NORDIX_ARTIFACT_URL