.gitlab-ci.yml 837 Bytes
Newer Older
Daniele Venzano's avatar
Daniele Venzano committed
1
stages:
2 3
  - build
  - test
Daniele Venzano's avatar
Daniele Venzano committed
4
  - push
Daniele Venzano's avatar
Daniele Venzano committed
5 6
  - deploy

Daniele Venzano's avatar
Daniele Venzano committed
7 8 9 10 11
build:pull-hub:
  stage: build
  script:
    - docker pull jupyter/datascience-notebook:latest

12 13 14 15 16 17
test:json:
  image: python:3-alpine
  stage: test
  before_script:
    - pip install requests
  script:
18
    - python /scripts/validate.py ${ZOE_VALIDATION_URL} datasci-notebook.json
19

Daniele Venzano's avatar
Daniele Venzano committed
20 21 22
push:all:
  stage: push
  script:
Daniele Venzano's avatar
Daniele Venzano committed
23
    - /scripts/distribute_docker_image.sh jupyter/datascience-notebook:latest
24 25
  only:
    - master
Daniele Venzano's avatar
Daniele Venzano committed
26

27 28 29 30 31
deploy:json:
  stage: deploy
  script:
    - mkdir -p ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}
    - cp *.json ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
32
    - cp *.png ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
33 34 35 36
    - cp README*.md ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
  artifacts:
    paths:
      - "*.json"
37
      - "*.png"
38
      - "README*.md"
Daniele Venzano's avatar
Daniele Venzano committed
39 40 41
  only:
    - master