.gitlab-ci.yml 679 Bytes
Newer Older
1
stages:
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
2
  - foo
3 4
  - build
  - test
5

6 7
variables:
  IMAGE: ${CI_REGISTRY_IMAGE}
8

Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
9 10 11 12 13 14
foo:
  image: docker:git
  stage: foo
  script:
    - git clone https://github.com/takluyver/mobilechelonian.git

15 16
build-image:
  stage: build #and stage
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
  services: docker:dind
  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