image: docker:latest
services:
    - docker:dind

variables:
    LATEST_VER: "registry.gitlab.com/synchrotron-soleil/control-system/containers/dev-el6:latest"

stages:
    - build

build-job:
    stage: build
#    only:
#        - master
    before_script:
        - echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
    script:
        - docker info
        - docker build -t $LATEST_VER .
        - docker push $LATEST_VER
