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

variables:
8
  VERSION: $CI_PIPELINE_ID
Daniele Venzano's avatar
Daniele Venzano committed
9

10 11 12
build:hub:
  stage: build
  script:
Daniele Venzano's avatar
Daniele Venzano committed
13
    - docker pull tensorflow/tensorflow:1.5.0-py3
14

15 16 17
test:json:
  image: python:3-alpine
  stage: test
18
  before_script:
19
    - pip install requests
20
  script:
Francesco Pace's avatar
Francesco Pace committed
21 22
    - python /scripts/validate.py ${ZOE_VALIDATION_URL} tf-google-jupyter.json
    - python /scripts/validate.py ${ZOE_VALIDATION_URL} tf-google-batch.json
23 24 25 26

pull:all:
  stage: pull
  script:
Daniele Venzano's avatar
Daniele Venzano committed
27
    - /scripts/distribute_docker_image.sh tensorflow/tensorflow:1.5.0-py3
28 29 30 31 32 33 34 35

deploy:json:
  stage: deploy
  script:
    - mkdir -p ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}
    - cp *.json ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
    - cp logo.png ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
    - cp README*.md ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
36 37 38
  artifacts:
    paths:
      - "*.json"
39 40 41 42
      - logo.png
      - "README*.md"
  only:
    - master
43