galerie-site/.gitlab-ci.yml

27 lines
443 B
YAML
Raw Normal View History

2019-06-08 13:33:13 +02:00
image: docker:latest
services:
- docker:dind
stages:
- build
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
NAME: $CI_PROJECT_NAME
build_and_push:
stage: build
only:
- master
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
only_build:
stage: build
except:
- master
script:
- docker build -t $IMAGE_TAG .