aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/common.sh
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-12-12 13:15:43 +0100
committerosmith <osmith@sysmocom.de>2020-01-16 14:42:02 +0000
commitd93fd48da9a4f3903be459a30459ab9d48d5cff3 (patch)
tree48914c608aad5df066857a503582c0dfabe649bc /scripts/common.sh
parentaadc60f4037dcf9529a30d362648b0f0849825c2 (diff)
OBS: clone from gerrit.osmocom.org
Work around "garbage at end of loose object" errors that occasionally cause these jenkins jobs to fail. A few repositories are not hosted on gerrit, so they still get cloned from git.osmocom.org. However, having almost all repositories cloned from gerrit should improve the situation a lot. Related: OS#4083 Change-Id: Id8f08a1bc10d6c81be9ad44c60646e2ea9f6cf4e
Diffstat (limited to 'scripts/common.sh')
-rw-r--r--scripts/common.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/common.sh b/scripts/common.sh
index 340bac8..1c2dfe0 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -1,6 +1,7 @@
#!/bin/sh
# Various functions and variables used in multiple osmo-ci shell scripts
OSMO_GIT_URL="https://git.osmocom.org"
+OSMO_GIT_URL_GERRIT="https://gerrit.osmocom.org"
# Osmocom repositories of which we want to build release tarballs automatically, and list the current versions at
# https://jenkins.osmocom.org/jenkins/job/Osmocom-list-commits/lastSuccessfulBuild/artifact/commits.txt
@@ -99,6 +100,20 @@ osmo_git_clone_date() {
fi
}
+# Print git clone URL for an Osmocom git repository. Prefer the gerrit clone URL, because cloning from the regular URL
+# sometimes results in the "garbage at end of loose object" error (OS#4083).
+# $1: Osmocom project (e.g. "osmo-hlr")
+osmo_git_clone_url() {
+ case "$1" in
+ rtl-sdr|osmo-fl2k|libosmo-dsp|libgtpnl|libasn1c|libusrp|libsmpp34)
+ echo "$OSMO_GIT_URL"/"$1"
+ ;;
+ *)
+ echo "$OSMO_GIT_URL_GERRIT"/"$1"
+ ;;
+ esac
+}
+
# Print the subdirectory of the repository where the source lies (configure.ac etc.).
# Print nothing when the source is in the topdir of the repository.
osmo_source_subdir() {