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

  1. variables:
  2. DEBIAN_FRONTEND: noninteractive
  3. IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
  4. RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
  5. image: docker:latest
  6. services:
  7. - docker:dind
  8. before_script:
  9. - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
  10. build:
  11. timeout: 3h
  12. stage: build
  13. script:
  14. - echo building $IMAGE and releasing as $RELEASE_IMAGE
  15. - docker pull $RELEASE_IMAGE || true
  16. - docker build --pull -t $IMAGE --cache-from $RELEASE_IMAGE .
  17. - docker push $IMAGE
  18. - docker tag $IMAGE $RELEASE_IMAGE
  19. - docker push $RELEASE_IMAGE
  20. test-docker:
  21. stage: test
  22. image: docker/compose
  23. script:
  24. - echo Runing docker-compose with $RELEASE_IMAGE
  25. # XXX: when there is an official gnunet image that works, replace this
  26. # See https://bugs.gnunet.org/view.php?id=6628
  27. - docker pull registry.gitlab.com/juga0/gnunet:latest
  28. - docker pull $RELEASE_IMAGE || true
  29. - /bin/sh ./docker/test.sh