Commit Graph

13 Commits

Author SHA1 Message Date
Oliver Smith 26565bb729 Simplify git checkout, allow branches and commits
Replace the following statements:

a) "git checkout -f -B $BRANCH origin/$BRANCH"
b) "git checkout -f -B $BRANCH $BRANCH"

with:

c) "git checkout -f $BRANCH"

Regarding a), we don't need to specify 'origin/' for each branch, since
we are cloning the repositories in the same Dockerfile, and therefore we
know for sure that there is only one remote and branch names won't be
ambiguous. Removing the 'origin/' allows to put commit hashes into the
branch variables (like done in the new bisect script [1]).

Version b) does not work with branch names:
$ git checkout -f -B osmith/check-imei-before-lu osmith/check-imei-before-lu
fatal: Cannot update paths and switch to branch 'osmith/check-imei-before-lu' at the same time.
Did you intend to checkout 'osmith/check-imei-before-lu' which can not be resolved as commit?

New version c) works with both commits and branches, and it is shorter.

[1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f

Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3
2019-05-07 10:24:52 +02:00
Daniel Willmann b59a9ed8d4 Add OSMO_*_BRANCH environment variables for build args
Previously we could only set OSMO_TTCN3_BRANCH as environment variable
to build a test other than master.

This patch adds environment variables for all osmo-*-master images which
allow docker tests to be executed for an arbitrary commit.

The origin/ prefix from the git checkout command is removed so the
*_BRANCH variable doesn't have to contain branch names, but van also
contain arbitrary commits. This shouldn't have any adverse effect as we
only have one remote in the checkout.

Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869
2019-04-25 13:56:14 +02:00
Harald Welte 7c53c9e60d Switch all osmo-*-master and ttcn3-*-test from jessie to stretch
Jessie will be EOL in June 2019, let's make the switch to stretch
before that.

Change-Id: I37a534d07081f3d321869c86d49d03171c8da0c6
2019-03-30 09:56:36 +00:00
Harald Welte cffe1022b5 print branch name and git commit hash during docker container build
This is quite useful when looking at jenkins logs to know which exact
version was built at the time.

Change-Id: Id52c382b454e2beecf46820752aeff15b2c1a0ae
2019-03-29 16:40:40 +00:00
Oliver Smith 6f176bd924 osmo-sgsn-master: install libosmo-gsup-client-dev
This library is required for building osmo-sgsn, and because it is
currently missing, Jenkins fails. No idea why it used to work without
the dependency though.

Example failure:
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-sgsn-test/328/console

Change-Id: I1cd5eb51fea9e39d82b12f10ef36c0bf8bbce472
2018-12-06 16:27:50 +01:00
Oliver Smith 7ed7a2bdd2 Fix "'laforge/debian-jessie-build' not found"
Instead of hardcoding laforge's username in all FROM statements in the
Dockerfiles, make use of the USER variable (as passed through by the
"make/Makefile" with "docker build --build-arg USER=..."). Thanks to
fixeria for proposing this fix!

This requires running docker-ce, old versions of docker (such as the
one in the official repositories of the latest Fedora) don't support
variables in the FROM line. But docker-ce can be installed after
adding docker's 3rd party repositories.

Closes: OS#3457

Change-Id: Ic5f11c8a4e247f632cb6aea6d147e94c53e0130f
2018-09-06 15:17:06 +02:00
Harald Welte 0434f34c36 osmo-*-master: add Dockerfile ARG for git repo branch to be built
This allows the user to build any non-master branches of the related
repositories, which is helpful for local testing before pushing changes
to git.

Change-Id: I0c3349e9a60015472c96bd24fbf29aad57501a00
2018-05-23 20:00:24 +02:00
Harald Welte 406b02090a osmo-sgsn-master: Use separate osmo-sgsn.git repository
Several months ago, osmo-sgsn received its own repository, and is no
longer contained in the openbsc.git.
2018-02-18 12:47:15 +01:00
Harald Welte 797fca544c Rename osmo_sgsn.cfg to osmo-sgsn.cfg
Since October 2017 the default config name no longer has an underscore
but a dash in the filename.  See osmo-sgsn.git Change-Id
If804da17a7481e79e000fe40ae0d9c4be9722e61
2018-02-18 12:09:35 +01:00
Harald Welte e0e2d6e96a osmo-*: Ensure container is rebuilt if nightly repo is updated
Let's use the "ADD" trick that we use for git repositories also for
the osmocom:nightly debian package feed.  This way any change to the
package feed will result in a rebuild of the container.
2017-12-17 10:48:54 +00:00
Harald Welte e21fe3a4fe Fix Dockerfile syntax error in apt-get command 2017-08-28 07:46:41 +02:00
Harald Welte 3c1dc34c91 apt-get: always use --no-install-recommends and apt-get clean
this helps us to avoid installing unneeded packages and removes the
package cache from the images to keep them less bloated.
2017-08-27 09:53:26 +02:00
Harald Welte cc17c6779c add Dockerfiles for osmo-nitb, osmo-sgsn + osmo-bts building latest master 2017-08-20 20:32:45 +02:00