ottobotv2/.gitlab-ci.yml

28 lines
462 B
YAML
Raw Permalink Normal View History

2019-05-22 15:59:50 +02:00
image: docker:latest
services:
- docker:dind
stages:
- build
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
NAME: $CI_PROJECT_NAME
DOCKER_BUILDKIT: 1
2019-05-22 15:59:50 +02:00
build_and_push:
stage: build
only:
- master
script:
2019-05-22 18:06:07 +02:00
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.voidcorp.nl
2019-05-22 15:59:50 +02:00
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
only_build:
stage: build
except:
- master
script:
- docker build -t $IMAGE_TAG .