jenkins: Sync submodules

Always sync submodules before the SCM step to handle coreboot adding
new submodules. This is needed because coreboot uses relative paths for
submodules, so git tries to clone it from the System76 GitHub
organization. We are not mirroring submodules and want to clone from
gerrit.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford 2023-11-17 14:29:35 -07:00 committed by Tim Crawford
parent 1cbe7576ee
commit 85896eca39

5
Jenkinsfile vendored
View File

@ -54,6 +54,11 @@ pipeline {
setBuildStatus("pending", "Pending")
slackSend(color: "good", message: "${env.JOB_NAME} - #${env.BUILD_ID} started (<${env.BUILD_URL}|Open>)")
sh """#!/bin/bash
# Update submodule URLs because of coreboot
git submodule sync --recursive
"""
// https://www.jenkins.io/doc/pipeline/steps/params/scmgit/
checkout scmGit(
branches: [[name: '${SOURCE_BRANCH}']],