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

5 6
variables:
  IMAGE: ${CI_REGISTRY_IMAGE}
7 8 9

build-image:
  stage: build #and stage
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
10 11
  services:
    - docker:dind
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  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
32
  script:
33
    - pytest