From 15d63bded80dd79040bb00085c6194fa8adbd1de Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Tue, 2 Apr 2024 14:31:49 +0200 Subject: [PATCH] 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 --- shell/jjb-deploy-job.sh | 1 + 1 file changed, 1 insertion(+) 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 -- 2.16.6