You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
962 B

variables:
DEBIAN_FRONTEND: noninteractive
IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
build:
timeout: 3h
stage: build
script:
- echo building $IMAGE and releasing as $RELEASE_IMAGE
- docker pull $RELEASE_IMAGE || true
- docker build --pull -t $IMAGE --cache-from $RELEASE_IMAGE .
- docker push $IMAGE
- docker tag $IMAGE $RELEASE_IMAGE
- docker push $RELEASE_IMAGE
test-docker:
stage: test
image: docker/compose
script:
- echo Runing docker-compose with $RELEASE_IMAGE
# XXX: when there is an official gnunet image that works, replace this
# See https://bugs.gnunet.org/view.php?id=6628
- docker pull registry.gitlab.com/juga0/gnunet:latest
- docker pull $RELEASE_IMAGE || true
- /bin/sh ./docker/test.sh