Commit Graph

15 Commits

Author SHA1 Message Date
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
Oliver Smith 052fe1bb8a make/Makefile: fix recursive 'PULL' error
Don't abort with the following error, when running 'make' without
setting the PULL environment variable:

 ../make/Makefile:20: *** Recursive variable 'PULL' references itself (eventually). Stop.

This fixes a regression from Change-Id
I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6.

Related: OS#3869
Change-Id: I4b4772e9ed6e07ab00943154265c9cbdea22a2f5
2019-04-04 08:16:44 +02:00
Oliver Smith a8be3ff52f jenkins-common.sh: pull upstream base images
Prevent building docker images on top of outdated Debian images, where
the package download feeds have been disabled. Use 'docker build --pull'
instead of 'docker build', whenever the "FROM" line in the Dockerfile
does not contain '$USER' (meaning this is an upstream image).

Checking the FROM line is necessary, as downloading '$USER' images will
fail (we never upload those).

Related: OS#3869
Change-Id: I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6
2019-04-02 11:38:26 +02:00
Oliver Smith ee386a6731 make/Makefile: allow overriding OSMO_TTCN3_BRANCH
Set the OSMO_TTCN3_BRANCH build argument from ttcn3-*/Dockerfile from
the environment variable of the same name, so it can be changed when
building the images with 'make' or './jenkins.sh'.

Dockerfiles that do not have a OSMO_TCCN3_BRANCH build arg produce a
warning. But this is also the case with Dockerfiles that don't have an
USER build arg, and avoiding the warning would only be possible with a
much more complex patch.

Change-Id: If2c312ff9206d1613fc19f41bd088c9aad523684
2019-03-04 13:13:37 +01:00
Harald Welte 4648003d0f Makefile: Fix default naming of images
This got broken in Change-Id If2e3cc7693ce5e7c1c95d2f81e302c72bb4230be

Change-Id: I97f9eb3f203301ebc2315ff38216d5b4502eb3d2
2018-06-03 17:17:58 +00:00
Harald Welte c400005f38 Makefile: get rid of entire git tagging logic
Change-Id: Idaa55b636031afd214853ccfcf6c9e3b097050b1
2018-06-03 15:54:34 +00:00
Harald Welte 9e631757be Makefile: Don't use "-dirty" logic when tagging docker images
Change-Id: Ie44144f25fd5f801ceeed904f6d19521b333ed0d
2018-06-03 15:54:34 +00:00
Harald Welte 9b94c793be Makefile: Only push a tag if there is a .release file
Change-Id: I73b2ed5794c75d09b166bc65ac79b9cbe3764ad4
2018-06-03 15:54:34 +00:00
Harald Welte a2e28ef91f Makefile: Allow override of REGISTRY/USERNAME/NAME/IMAGE
Change-Id: If2e3cc7693ce5e7c1c95d2f81e302c72bb4230be
2018-06-03 15:54:34 +00:00
Alexander Couzens 5910de0394 Makefile: use $USER/image when depending on a generated image
Te make scripts will generate docker images like
"$username/foobar-test". When depending on an previous image,
the $username must match or the build will about with image not found.

Change-Id: Ied42c3e1de9a2ffaca22ba4cd02e6a398e48e97d
2018-04-12 09:20:34 +00:00
Neels Hofmeyr 2f1b669e2f fix 'make -C subdir': use $(CURDIR) instead of $PWD
$(PWD) reflects the dir of 'make' invocation, $(CURDIR) the dir stepped into.
So obtain the current dir from $(CURDIR) instead of $(PWD).

So far, when doing 'make -C osmo-foo-maser', the image's name would be derived
from the root dir's basename and all images were tagged as 'docker-playground'.
With this fix, 'make -C' from anywhere still tags with the proper name.

Change-Id: I1dd0fd1ad89fdee18fdbea851ccc831ad60aeccf
2018-04-05 03:15:23 +02:00
Harald Welte 6bce1e644f Makefiles: Don't tag images with versions by default
Tagging each build with a version means we have to clean up lots of
images manually.  Let's change this to:
* "make build" aka "make docker-build" only builds as $name:latest
* "make docker-tag" will tag $name:latest as $name:$version

This is racey, but then we don't really need version tags for the images
so far anyway.
2017-10-15 14:45:03 +00:00
Harald Welte 58343d6c87 Makefile: Fix 'make run' to use correct image name 2017-08-19 20:18:59 +02:00
Harald Welte 4bda77175e Introduce 'make run' to run the respective container 2017-08-19 19:51:35 +02:00
Harald Welte fc0fec7941 Import Makefile from https://github.com/mvanholsteijn/docker-makefile
upstream git version is 190313ea54af7d175dd3469a39a95654d068b83e
2017-08-19 19:31:49 +02:00