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

variables:
9
  VERSION: 10396
10
  REPOSITORY: zapps
11

Daniele Venzano's avatar
Daniele Venzano committed
12 13 14 15 16 17
image: docker:latest

before_script:
  - mkdir -p $HOME/.docker
  - echo $DOCKER_AUTH_CONFIG > $HOME/.docker/config.json

18
build:spark-jupyter-notebook:
Daniele Venzano's avatar
Daniele Venzano committed
19 20
  stage: build
  script:
21
    - docker build --build-arg VERSION=${VERSION} -t ${REPOSITORY}/spark-jupyter-notebook:${VERSION} spark-jupyter-notebook
Daniele Venzano's avatar
Daniele Venzano committed
22

23
build:spark-master:
Daniele Venzano's avatar
Daniele Venzano committed
24 25
  stage: build
  script:
26
    - docker build --build-arg VERSION=${VERSION} -t ${REPOSITORY}/spark-master:${VERSION} spark-master
Daniele Venzano's avatar
Daniele Venzano committed
27

28
build:spark-worker:
Daniele Venzano's avatar
Daniele Venzano committed
29 30
  stage: build
  script:
31
    - docker build --build-arg VERSION=${VERSION} -t ${REPOSITORY}/spark-worker:${VERSION} spark-worker
Daniele Venzano's avatar
Daniele Venzano committed
32 33 34 35 36 37 38

test:json:
  image: python:3-alpine
  stage: test
  before_script:
    - pip install requests
  script:
39 40 41 42 43
    - python gen_json.py
    - python /scripts/validate.py ${ZOE_VALIDATION_URL} spark.json
  artifacts:
    paths:
      - spark.json
44
      - clouds.json
45 46 47
      - manifest.json
      - logo.png
      - README.md
Daniele Venzano's avatar
Daniele Venzano committed
48
      - README-clouds.md
49
      - images
50 51 52 53

push:hub:
  stage: push
  script:
54 55 56
    - docker push ${REPOSITORY}/spark-master:${VERSION}
    - docker push ${REPOSITORY}/spark-worker:${VERSION}
    - docker push ${REPOSITORY}/spark-jupyter-notebook:${VERSION}
57 58 59
  only:
    - master