.gitlab-ci.yml 677 Bytes
Newer Older
1 2 3
stages:
  - build
  - test
4

5 6
variables:
  IMAGE: ${CI_REGISTRY_IMAGE}
7

Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
8
debug:
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
9 10 11
  image: docker:git
  stage: test
  script:
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
12
    - git clone https://github.com/jupyterhub/nbgitpuller.git
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
13

14 15
build-image:
  stage: build #and stage
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
16 17
  services:
    - docker:dind
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
  image: docker:git

  before_script:
    - docker login -u gitlab-ci-token -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
  script:
    - docker pull jupyter/tensorflow-notebook
    - docker build -t ${IMAGE} .
    - docker push ${IMAGE}
  after_script:
    - 'docker logout $CI_REGISTRY'

  only:
    changes:
      - Dockerfile
      - environment.yml

image: ${IMAGE}

tests_python_packages:
  stage: test
Marco Leoni's avatar
Marco Leoni committed
38
  script:
39
    - pytest