From dd9eafdb0cb2d3c7ea39060a8caf283269c3ff71 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 30 Apr 2021 16:39:09 +0200 Subject: [PATCH] make: add OSMOCOM_REPO_TESTSUITE_MIRROR Make it possible to set a different mirror for debian-stretch-titan than for all other containers. 2021q1 doesn't have the eclipse-titan package and it doesn't make sense to build it there. I've thought about adding OSMOCOM_REPO_TESTSUITE_PATH and OSMOCOM_REPO_TESTSUITE_VERSION too, but we don't have any use for these right now. Let's add them later if we should need them. Related: SYS#5370. Change-Id: I7187473c2188a864b60b03789eff62e0a527404a --- debian-stretch-titan/Dockerfile | 4 ++-- make/Makefile | 8 ++++++++ osmocom-bb-host-master/Dockerfile | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile index e28c5560..5b6b1348 100644 --- a/debian-stretch-titan/Dockerfile +++ b/debian-stretch-titan/Dockerfile @@ -2,11 +2,11 @@ ARG REGISTRY=docker.io ARG UPSTREAM_DISTRO=debian:stretch FROM ${REGISTRY}/${UPSTREAM_DISTRO} # Arguments used after FROM must be specified again -ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" +ARG OSMOCOM_REPO_TESTSUITE_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte -ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_TESTSUITE_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/" RUN apt-get update && apt-get install -y \ gnupg diff --git a/make/Makefile b/make/Makefile index 6d053f99..edb08909 100644 --- a/make/Makefile +++ b/make/Makefile @@ -47,6 +47,13 @@ OSMOCOM_REPO_MIRROR?=http://download.opensuse.org OSMOCOM_REPO_PATH?=repositories/network:/osmocom: # Use "nightly" to use the nightly feed OSMOCOM_REPO_VERSION?=latest +# Build the testsuite with the following mirror. In jenkins we always want to +# point this to http://download.opensuse.org, so the same testsuite can be +# used no matter which OSMOCOM_REPO_MIRROR is set. This avoids rebuilding the +# testsuite when we only want to change OSMOCOM_REPO_MIRROR to build different +# subjects under test, and it works even if the OSMOCOM_REPO_MIRROR only has +# a subset of the network:osmocom:latest packages (i.e. no eclipse-titan). +OSMOCOM_REPO_TESTSUITE_MIRROR?=$(OSMOCOM_REPO_MIRROR) ROOT_DIR=$(shell git rev-parse --show-toplevel) RELEASE_SUPPORT := $(ROOT_DIR)/make/.make-release-support @@ -84,6 +91,7 @@ docker-build: .release --build-arg OSMOCOM_REPO_MIRROR=$(OSMOCOM_REPO_MIRROR) \ --build-arg OSMOCOM_REPO_PATH=$(OSMOCOM_REPO_PATH) \ --build-arg OSMOCOM_REPO_VERSION=$(OSMOCOM_REPO_VERSION) \ + --build-arg OSMOCOM_REPO_TESTSUITE_MIRROR=$(OSMOCOM_REPO_TESTSUITE_MIRROR) \ --build-arg LIBOSMOCORE_BRANCH=$(LIBOSMOCORE_BRANCH) \ --build-arg OSMO_BB_BRANCH=$(OSMO_BB_BRANCH) \ --build-arg OSMO_BSC_BRANCH=$(OSMO_BSC_BRANCH) \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 53b8dcca..2e86767e 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -4,13 +4,13 @@ ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" FROM $USER/$DISTRO-build # Arguments used after FROM must be specified again ARG DISTRO -ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" +ARG OSMOCOM_REPO_TESTSUITE_MIRROR="http://download.opensuse.org" MAINTAINER Harald Welte ARG OSMO_BB_BRANCH="master" -ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" +ARG OSMOCOM_REPO="$OSMOCOM_REPO_TESTSUITE_MIRROR/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY .common/Release.key /tmp/Release.key