Replace most remaining git.osmocom.org urls

Replace the legacy git.osmocom.org clone URLs with either gerrit or
gitea in most places. Besides not using legacy urls anymore, the
advantage of using gerrit directly is that we don't have a delay of 10
min to several hours on the repository.

Not replaced:
* ansible/roles/osmocom-workstation: not sure if still used, would need
  a bit of a rewrite to use logic similar to osmo_git_clone_url().

Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Git_infrastructure
Change-Id: I90409c9e7f4db4e1765647021625f9acfccaa78b
This commit is contained in:
Oliver Smith 2022-09-26 12:48:48 +02:00
parent a5521ff99e
commit 7fc58133d6
15 changed files with 18 additions and 18 deletions

View File

@ -8,14 +8,14 @@
become: yes become: yes
become_user: "{{ jenkins_user }}" become_user: "{{ jenkins_user }}"
git: git:
repo: "https://git.osmocom.org/osmo-ci" repo: "https://gerrit.osmocom.org/osmo-ci"
dest: "/home/{{ jenkins_user }}/osmo-ci" dest: "/home/{{ jenkins_user }}/osmo-ci"
- name: deploy osmo-gsm-manuals to home directory - name: deploy osmo-gsm-manuals to home directory
become: yes become: yes
become_user: "{{ jenkins_user }}" become_user: "{{ jenkins_user }}"
git: git:
repo: "https://git.osmocom.org/osmo-gsm-manuals" repo: "https://gerrit.osmocom.org/osmo-gsm-manuals"
dest: "/home/{{ jenkins_user }}/osmo-gsm-manuals" dest: "/home/{{ jenkins_user }}/osmo-gsm-manuals"
- name: rebuild osmocom docker images for jenkins build tests - name: rebuild osmocom docker images for jenkins build tests

View File

@ -11,7 +11,7 @@
become: yes become: yes
become_user: "{{ jenkins_user }}" become_user: "{{ jenkins_user }}"
git: git:
repo: "https://git.osmocom.org/docker-playground" repo: "https://gerrit.osmocom.org/docker-playground"
dest: "/home/{{ jenkins_user }}/jenkins/docker-playground" dest: "/home/{{ jenkins_user }}/jenkins/docker-playground"
- name: add apt.key - name: add apt.key

View File

@ -18,7 +18,7 @@
become: yes become: yes
become_user: "jenkins" become_user: "jenkins"
git: git:
repo: "https://git.osmocom.org/osmo-ci" repo: "https://gerrit.osmocom.org/osmo-ci"
dest: "/home/jenkins/osmo-ci" dest: "/home/jenkins/osmo-ci"
roles: roles:
- name: gsm-tester - name: gsm-tester

View File

@ -4,7 +4,7 @@ set -e -x
# Clone repository to ~/, or update existing # Clone repository to ~/, or update existing
# $1: name of osmocom project # $1: name of osmocom project
clone_repo() { clone_repo() {
cd ~/"$1" || (cd ~/ && git clone https://git.osmocom.org/"$1" && cd ~/"$1") cd ~/"$1" || (cd ~/ && git clone https://gerrit.osmocom.org/"$1" && cd ~/"$1")
git rev-parse HEAD git rev-parse HEAD
git status git status

View File

@ -25,7 +25,7 @@
- git: - git:
branches: branches:
- '$BRANCH' - '$BRANCH'
url: https://git.osmocom.org/osmo-ci url: https://gerrit.osmocom.org/osmo-ci
git-config-name: 'Jenkins Builder' git-config-name: 'Jenkins Builder'
git-config-email: 'jenkins@osmocom.org' git-config-email: 'jenkins@osmocom.org'
triggers: triggers:

View File

@ -26,7 +26,7 @@
name: GIT_URL_PREFIX name: GIT_URL_PREFIX
description: | description: |
Where to clone the sources from Where to clone the sources from
default: 'https://git.osmocom.org/' default: 'https://gerrit.osmocom.org/'
- bool: - bool:
name: BUILD name: BUILD
description: | description: |
@ -65,7 +65,7 @@
- git: - git:
branches: branches:
- '$BRANCH' - '$BRANCH'
url: https://git.osmocom.org/osmo-ci url: https://gerrit.osmocom.org/osmo-ci
git-config-name: 'Jenkins Builder' git-config-name: 'Jenkins Builder'
git-config-email: 'jenkins@osmocom.org' git-config-email: 'jenkins@osmocom.org'

View File

@ -26,7 +26,7 @@
- git: - git:
branches: branches:
- '$BRANCH' - '$BRANCH'
url: https://git.osmocom.org/osmo-ci url: https://gerrit.osmocom.org/osmo-ci
git-config-name: 'Jenkins Builder' git-config-name: 'Jenkins Builder'
git-config-email: 'jenkins@osmocom.org' git-config-email: 'jenkins@osmocom.org'
triggers: triggers:

View File

@ -44,7 +44,7 @@
- git: - git:
branches: branches:
- '$BRANCH' - '$BRANCH'
url: https://git.osmocom.org/osmo-ci url: https://gerrit.osmocom.org/osmo-ci
git-config-name: 'Jenkins Builder' git-config-name: 'Jenkins Builder'
git-config-email: 'jenkins@osmocom.org' git-config-email: 'jenkins@osmocom.org'
triggers: triggers:

View File

@ -61,7 +61,7 @@
description: | description: |
Version of the Osmocom stack to test against the kernel. Either Version of the Osmocom stack to test against the kernel. Either
<code>latest</code> for the latest release version, or <code>latest</code> for the latest release version, or
<code>master</code> for HEAD of git.osmocom.org. <code>master</code> for HEAD of Osmocom git repositories.
default: 'latest' default: 'latest'
- string: - string:
name: BRANCH name: BRANCH

View File

@ -5,7 +5,7 @@
disabled: false disabled: false
description: | description: |
Run the a testsuite from Run the a testsuite from
<a href="https://git.osmocom.org/docker-playground/"> <a href="https://gitea.osmocom.org/osmocom/docker-playground">
docker-playground.git</a>.<br> docker-playground.git</a>.<br>
If this job ends in <code>-latest</code>, the job runs the latest If this job ends in <code>-latest</code>, the job runs the latest
stable versions of the Osmocom stack. Otherwise the nightly builds.<br> stable versions of the Osmocom stack. Otherwise the nightly builds.<br>

View File

@ -155,7 +155,7 @@ docker_images_require() {
if [ -d "_docker_playground" ]; then if [ -d "_docker_playground" ]; then
git -C _docker_playground fetch git -C _docker_playground fetch
else else
git clone https://git.osmocom.org/docker-playground/ _docker_playground git clone https://gerrit.osmocom.org/docker-playground/ _docker_playground
fi fi
cd _docker_playground cd _docker_playground

View File

@ -172,7 +172,7 @@ branch_and_rev_of_local_repo() {
branch_and_rev_of_remote_repo() { branch_and_rev_of_remote_repo() {
if [ -z "${2+x}" ]; then branch="master"; else branch="$2"; fi if [ -z "${2+x}" ]; then branch="master"; else branch="$2"; fi
branch="$( echo "$branch" | tr '/' '_')" branch="$( echo "$branch" | tr '/' '_')"
rev="$(git ls-remote "https://git.osmocom.org/$1" "refs/heads/$branch")" rev="$(git ls-remote "https://gerrit.osmocom.org/$1" "refs/heads/$branch")"
# check whether branch is a tag # check whether branch is a tag
if [ "$rev" = "" ]; then if [ "$rev" = "" ]; then

View File

@ -2,7 +2,7 @@
# Copyright 2018 sysmocom - s.f.m.c. GmbH <info@sysmocom.de> # Copyright 2018 sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
# Where to clone sources from (with trailing slash) # Where to clone sources from (with trailing slash)
git_url_prefix = "https://git.osmocom.org/" git_url_prefix = "https://gerrit.osmocom.org/"
# Default projects to build when none are specified on the command line # Default projects to build when none are specified on the command line
projects = ("osmo-bts", projects = ("osmo-bts",

View File

@ -14,7 +14,7 @@ def git_clone(workdir, prefix, cache_git_fetch, repository, version):
""" Clone a missing git repository and checkout a specific version tag. """ Clone a missing git repository and checkout a specific version tag.
:param workdir: path to where all data (git, build, install) is stored :param workdir: path to where all data (git, build, install) is stored
:param prefix: git url prefix (e.g. "https://git.osmocom.org/") :param prefix: git url prefix (e.g. "https://gerrit.osmocom.org/")
:param cache_git_fetch: list of repositories that have already been :param cache_git_fetch: list of repositories that have already been
fetched in this run of osmo-depcheck fetched in this run of osmo-depcheck
:param repository: Osmocom git repository name (e.g. "libosmo-abis") :param repository: Osmocom git repository name (e.g. "libosmo-abis")
@ -56,7 +56,7 @@ def generate(workdir, prefix, cache_git_fetch, initial, rev):
repository, parsing the "configure.ac" file, and recursing. repository, parsing the "configure.ac" file, and recursing.
:param workdir: path to where all data (git, build, install) is stored :param workdir: path to where all data (git, build, install) is stored
:param prefix: git url prefix (e.g. "https://git.osmocom.org/") :param prefix: git url prefix (e.g. "https://gerrit.osmocom.org/")
:param cache_git_fetch: list of repositories that have already been :param cache_git_fetch: list of repositories that have already been
fetched in this run of osmo-depcheck fetched in this run of osmo-depcheck
:param initial: the first program to look at (e.g. "osmo-bts") :param initial: the first program to look at (e.g. "osmo-bts")

View File

@ -16,7 +16,7 @@ case "$1" in
version="origin/master" version="origin/master"
;; ;;
oct) oct)
uri="https://git.osmocom.org/octphy-2g-headers" uri="https://gitea.osmocom.org/cellular-infrastructure/octphy-2g-headers"
version_prefix="" version_prefix=""
version="origin/master" version="origin/master"
;; ;;