From: Vratko Polak Date: Tue, 2 Apr 2024 12:31:49 +0000 (+0200) Subject: Fix: Update submodules in jjb-deploy-job X-Git-Tag: v0.90.4~4 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F72775%2F2;p=releng%2Fglobal-jjb.git Fix: Update submodules in jjb-deploy-job 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 --- diff --git a/shell/jjb-deploy-job.sh b/shell/jjb-deploy-job.sh index f62b7df0..dff70828 100644 --- a/shell/jjb-deploy-job.sh +++ b/shell/jjb-deploy-job.sh @@ -26,6 +26,7 @@ lf-activate-venv --python python3 --venv-file /tmp/.jjb_venv jenkins-job-builder 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