osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/29119 )

Change subject: osmocom-list-commits: use proper git clone urls
......................................................................

osmocom-list-commits: use proper git clone urls

Fix the Osmocom-list-commits jenkins job that is currently failing with:
  fatal: repository 'https://git.osmocom.org/osmo-upf/' not found

Change-Id: I2acb9880be57411f11805a2195076b514156aaf3
---
M scripts/common.sh
M scripts/osmocom-list-commits.sh
2 files changed, 8 insertions(+), 3 deletions(-)

Approvals:
  daniel: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/scripts/common.sh b/scripts/common.sh
index e085123..23a3380 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -52,7 +52,9 @@
 osmo_git_head_commit() {
        # git output:
        # f90496f577e78944ce8db1aa5b900477c1e479b0        HEAD
-       ret="$(git ls-remote "$OSMO_GIT_URL/$1" HEAD)"
+       local url ret
+       url="$(osmo_git_clone_url "$1")"
+       ret="$(git ls-remote "$url" HEAD)"
        ret="$(echo "$ret" | awk '{print $1}')"
        echo "$ret"
 }
@@ -72,7 +74,9 @@
        # ee618ecbedec82dfd240334bc87d0d1c806477b0        
refs/tags/debian/0.9.13-0_jrsantos.1
        # a3fdd24af099b449c9856422eb099fb45a5595df        
refs/tags/debian/0.9.13-0_jrsantos.1^{}
        # ...
-       ret="$(git ls-remote --tags "$OSMO_GIT_URL/$1")"
+       local url ret
+       url="$(osmo_git_clone_url "$1")"
+       ret="$(git ls-remote --tags "$url")"
        ret="$(echo "$ret" | grep 'refs/tags/[0-9.]*$' || true)"
        ret="$(echo "$ret" | sort -V -t/ -k3)"
        if [ "$2" != "all" ]; then
diff --git a/scripts/osmocom-list-commits.sh b/scripts/osmocom-list-commits.sh
index b584195..3fec196 100755
--- a/scripts/osmocom-list-commits.sh
+++ b/scripts/osmocom-list-commits.sh
@@ -15,10 +15,11 @@
        last_tag="$(osmo_git_last_tags "$repo" 1 "-")"
        last_commit="$(osmo_git_last_commits "$repo" 1 "-")"
        head_commit="$(osmo_git_head_commit "$repo")"
+       clone_url="$(osmo_git_clone_url "$repo")"

        printf "$FORMAT_STR" \
                "$repo.git" \
-               "$OSMO_GIT_URL/$repo" \
+               "$clone_url" \
                "$last_tag" \
                "$last_commit" \
                "$head_commit"

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29119
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I2acb9880be57411f11805a2195076b514156aaf3
Gerrit-Change-Number: 29119
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-MessageType: merged

Reply via email to