before_script:
  - docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" zoo.smok.co

stages:
  - test
  - build
  - deploy

unittest:
  before_script:
    - echo "Not logging in"
  script:
    - docker-compose up --build unittest
  after_script:
    - docker-compose down


build:
  stage: build
  script:
    - DOCKERIT_NO_BRANCH=1 docker-it netguru zoo.smok.co/henrietta/netguru .

deploy:
  stage: deploy
  only:
    - master
  script:
    - docker stack deploy --with-registry-auth -c deployment/docker-compose.yml netguru
  tags:
    - net224
