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

Change subject: repo-install-test: adjust for obs.osmocom.org
......................................................................

repo-install-test: adjust for obs.osmocom.org

Related: OS#5557
Change-Id: Ib53df6c40ae92634e6d93389dcb8a21c48dfb63d
---
M scripts/repo-install-test.sh
M scripts/repo-install-test/run-inside-docker.sh
2 files changed, 20 insertions(+), 22 deletions(-)

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



diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index d34cf6e..2a3e739 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -2,8 +2,8 @@
 # Environment variables:
 # * INTERACTIVE: set to 1 to keep an interactive shell open after the script 
ran (for debugging)
 # * FEED: binary package feed (e.g. "latest", "nightly")
-# * PROJ: OBS project namespace (e.g. "network:osmocom:latest")
-# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. 
"network:osmocom:nightly")
+# * PROJ: OBS project namespace (e.g. "osmocom:latest")
+# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly")
 # * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development)
 # * TESTS: which tests to run (all by default, see below for possible values)
 . "$(dirname "$0")/common.sh"
@@ -31,7 +31,7 @@
 docker_images_require "$DISTRO-repo-install-test"

 FEED="${FEED:-nightly}"
-PROJ="${PROJ:-network:osmocom:$FEED}"
+PROJ="${PROJ:-osmocom:$FEED}"
 CONTAINER="$DISTRO-repo-install-test-$FEED"

 if [ -z "$TESTS" ]; then
@@ -46,13 +46,13 @@
 if [ -z "$PROJ_CONFLICT" ]; then
        case "$FEED" in
                latest)
-                       PROJ_CONFLICT="network:osmocom:nightly"
+                       PROJ_CONFLICT="osmocom:nightly"
                        ;;
                nightly)
-                       PROJ_CONFLICT="network:osmocom:latest"
+                       PROJ_CONFLICT="osmocom:latest"
                        ;;
                next)
-                       PROJ_CONFLICT="network:osmocom:nightly"
+                       PROJ_CONFLICT="osmocom:nightly"
                        ;;
        esac
 fi
diff --git a/scripts/repo-install-test/run-inside-docker.sh 
b/scripts/repo-install-test/run-inside-docker.sh
index fec344e..f95bae0 100755
--- a/scripts/repo-install-test/run-inside-docker.sh
+++ b/scripts/repo-install-test/run-inside-docker.sh
@@ -1,8 +1,8 @@
 #!/bin/sh -ex
 # Environment variables:
 # * FEED: binary package feed (e.g. "latest", "nightly")
-# * PROJ: OBS project namespace (e.g. "network:osmocom:latest")
-# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. 
"network:osmocom:nightly")
+# * PROJ: OBS project namespace (e.g. "osmocom:latest")
+# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly")
 # * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development)
 # * DISTRO: linux distribution  name (e.g. "centos8")
 # * TESTS: which tests to run (see repo-install-test.sh)
@@ -54,12 +54,12 @@

 DISTRO_OBSDIR="$(distro_obsdir)"

-# $1: OBS project (e.g. "network:osmocom:nightly" -> 
"network:/osmocom:/nightly")
+# $1: OBS project (e.g. "osmocom:nightly" -> "osmocom:/nightly")
 proj_with_slashes() {
        echo "$1" | sed "s.:.:/.g"
 }

-# $1: OBS project (e.g. "network:osmocom:nightly" -> "network_osmocom_nightly")
+# $1: OBS project (e.g. "osmocom:nightly" -> "osmocom_nightly")
 proj_with_underscore() {
        echo "$1" | tr : _
 }
@@ -96,10 +96,10 @@
        fi
 }

-# $1: OBS project (e.g. "network:osmocom:nightly")
+# $1: OBS project (e.g. "osmocom:nightly")
 configure_osmocom_repo_debian() {
        local proj="$1"
-       local obs_repo="download.opensuse.org/repositories/$(proj_with_slashes 
"$proj")/$DISTRO_OBSDIR/"
+       local obs_repo="downloads.osmocom.org/packages/$(proj_with_slashes 
"$proj")/$DISTRO_OBSDIR/"

        echo "Configuring Osmocom repository"

@@ -107,7 +107,7 @@
        if ! [ -e "$release_key" ]; then
                apt-get update
                apt install -y wget
-               wget -O /tmp/Release.key 
"https://build.opensuse.org/projects/network:osmocom/public_key";
+               wget -O /tmp/Release.key 
"https://obs.osmocom.org/projects/$proj/public_key";
        fi
        apt-key add /tmp/Release.key

@@ -115,20 +115,20 @@
        apt-get update
 }

-# $1: OBS project (e.g. "network:osmocom:nightly")
+# $1: OBS project (e.g. "osmocom:nightly")
 configure_osmocom_repo_debian_remove() {
        local proj="$1"
        rm "/etc/apt/sources.list.d/$proj.list"
 }

-# $1: OBS project (e.g. "network:osmocom:nightly")
+# $1: OBS project (e.g. "osmocom:nightly")
 configure_osmocom_repo_centos() {
        local proj="$1"
-       local 
baseurl="https://download.opensuse.org/repositories/$(proj_with_slashes 
"$proj")/$DISTRO_OBSDIR"
+       local 
baseurl="https://downloads.osmocom.org/packages/$(proj_with_slashes 
"$proj")/$DISTRO_OBSDIR"

        echo "Configuring Osmocom repository"
        # Generate this file, based on the feed:
-       # 
https://download.opensuse.org/repositories/network:osmocom:latest/CentOS_8/network:osmocom:latest.repo
+       # 
https://downloads.osmocom.org/packages/osmocom:/latest/CentOS_8/osmocom:latest.repo
        cat << EOF > "/etc/yum.repos.d/$proj.repo"
 [$(proj_with_underscore "$proj")]
 name=$proj
@@ -140,13 +140,13 @@
 EOF
 }
 
-# $1: OBS project (e.g. "network:osmocom:nightly")
+# $1: OBS project (e.g. "osmocom:nightly")
 configure_osmocom_repo_centos_remove() {
        local proj="$1"
        rm "/etc/yum.repos.d/$proj.repo"
 }

-# $1: OBS project (e.g. "network:osmocom:nightly")
+# $1: OBS project (e.g. "osmocom:nightly")
 configure_osmocom_repo() {
        case "$DISTRO" in
                debian*)
@@ -285,14 +285,12 @@
 }

 install_repo_packages_debian() {
-       local obs="obs://build.opensuse.org/$PROJ/$DISTRO_OBSDIR"
-
        echo "Installing all repository packages"

        # Get a list of all packages from the repository. Reference:
        # https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html
        aptitude search -F%p \
-               "?origin($obs) ?architecture(native)" | sort \
+               "?origin(.*$PROJ.*) ?architecture(native)" | sort \
                > osmocom_packages_all.txt

        filter_packages_txt



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29157
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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

Reply via email to