Skip to content

Commit

Permalink
Fix: Update submodules in jjb-deploy-job
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vrpolakatcisco committed Apr 2, 2024
1 parent e8f821f commit 15d63bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shell/jjb-deploy-job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15d63bd

Please sign in to comment.