Commit 58028eb2 authored by Daniele Venzano's avatar Daniele Venzano

Update image and gitlab CI

parent 8afbd15c
Pipeline #4765 failed with stages
in 87 minutes and 14 seconds
stages:
- build
- test
- pull
- deploy
variables:
......@@ -15,13 +16,29 @@ build:json:
paths:
- "*.json"
build:hub:
stage: build
script:
- docker pull tensorflow/magenta
- docker pull tensorflow/syntaxnet
- docker pull gcr.io/tensorflow/tensorflow:1.3.0-gpu-py3
- docker pull gcr.io/tensorflow/tensorflow:1.3.0-py3
test:json:
image: python:3-alpine
stage: test
before_script:
- pip install requests
script:
- python validate.py ${ZOE_VALIDATION_URL} *google.json
- python /scripts/validate.py ${ZOE_VALIDATION_URL} *google.json
pull:all:
stage: pull
script:
- /scripts/distribute_docker_image.sh tensorflow/magenta
- /scripts/distribute_docker_image.sh tensorflow/syntaxnet
- /scripts/distribute_docker_image.sh gcr.io/tensorflow/tensorflow:1.3.0-gpu-py3
- /scripts/distribute_docker_image.sh gcr.io/tensorflow/tensorflow:1.3.0-py3
deploy:json:
stage: deploy
......
#!/usr/bin/python
import json
import sys
import requests
URL = sys.argv[1]
files = sys.argv[2:]
for f in files:
data = json.load(open(f, encoding="utf-8"))
data_req = { "application": data }
r = requests.post(URL, json=data_req)
if r.status_code != 200:
rep = r.json()
print(rep['message'])
sys.exit(1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment