The jjb-deploy-job can be used to test upgrades
in ci-management related repositories.
Those contain submodules, e.g. global-jjb.
The parent way to checkout the change under test
does not update the submodules,
so the job uses a combination of unmerged main repo
with current master HEAD submodules.
That is unhelpful and dangerous.
This change adds a command
to update the submodules after checkout,
so they match the commit under test.
In the Issue field I am pointing
to otherwise unrelated issue
that prompted me to start verifying
submodule upgrades in Sandbox.
That is because I cannot find a way
to open a new ticket in:
https://jira.linuxfoundation.org/projects/RELENG/issues
Issue: RELENG-5184
Change-Id: I407ccf86e404bd01675439bb4df8c85a804267bc
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
if [ "${GERRIT_PROJECT}" == "${PROJECT}" ]; then
echo "-----> Fetching ${PROJECT} patch"
git fetch origin "$GERRIT_REFSPEC" && git checkout FETCH_HEAD
+ git submodule update --init --recursive
fi
# If not Gerrit Trigger than assume GitHub