.gitlab-ci.yml 814 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 13 14
build:hub:
  stage: build
  script:
    - docker pull tensorflow/magenta

15 16 17
test:json:
  image: python:3-alpine
  stage: test
18
  before_script:
19
    - pip install requests
20
  script:
21
    - python /scripts/validate.py ${ZOE_VALIDATION_URL} mag-google.json
22 23 24 25 26

pull:all:
  stage: pull
  script:
    - /scripts/distribute_docker_image.sh tensorflow/magenta
27 28 29 30 31 32 33 34

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}/
35 36 37
  artifacts:
    paths:
      - "*.json"
38 39 40 41
      - logo.png
      - "README*.md"
  only:
    - master
42