Added build pipeline

This commit is contained in:
Nicolai Ort 2020-06-06 22:25:04 +02:00
parent 94c2879cc0
commit 3c73414288
1 changed files with 25 additions and 0 deletions

25
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,25 @@
image: docker:dind
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
before_script:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
build:
stage: build
script:
- docker build . -t frontend:$CI_COMMIT_SHORT_SHA
- docker tag frontend:$CI_COMMIT_SHORT_SHA $CI_REGISTRY/taskboard/frontend:$CI_COMMIT_SHORT_SHA
- docker push $CI_REGISTRY/taskboard/frontend:$CI_COMMIT_SHORT_SHA
- docker tag frontend:$CI_COMMIT_SHORT_SHA $CI_REGISTRY/taskboard/frontend:latest
- docker push $CI_REGISTRY/taskboard/frontend:latest
tags:
- frontend