variables:
  DOCKER_HOST: tcp://docker:2375/
  DOCKER_DRIVER: overlay2

stages:
  - build

before_script:
  - apk update
  - apk add nodejs npm
  - apk add yarn
  - export TAG=${CI_COMMIT_TAG:-latest}


build:
  stage: build
  services:
    - docker:18.09.6-dind
  script:
    - ./build.sh
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.e-biz.fr
    - docker build . -t $CI_REGISTRY_IMAGE
    - docker push $CI_REGISTRY_IMAGE:$TAG
  only:
    - master
