stages:
  - build
  - test

variables:
  CONTAINER_TEST_IMAGE: boileaum/rosen:latest

before_script:
  - docker login -u boileaum -p $DOCKERHUB_PASSWD

b:docker:
  stage: build
  tags:
    - shell, docker
  script:
    - docker build --pull -t $CONTAINER_TEST_IMAGE -f ./docker/Dockerfile-rosen .
    - docker push $CONTAINER_TEST_IMAGE

t:docker:
  stage: test
  tags:
    - shell, docker
  script:
    #- docker build --pull -t boileaum/rosen:latest -f ./docker/Dockerfile-rosen .
    - docker pull $CONTAINER_TEST_IMAGE
    - docker run $CONTAINER_TEST_IMAGE /bin/bash -c 'pytest -v'

