Commit 1b9e08bc authored by Cristian Livadaru's avatar Cristian Livadaru
Browse files

add gitlab CI

parent aa19d496
Pipeline #4411 canceled with stages
image: docker:stable
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
IMAGE_TAG: lcxat/psql-prefix:$CI_COMMIT_TAG
services:
- docker:dind
before_script:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
stages:
- build
- dockerhub
build:
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --build-arg RUBY_VERSION=$RUBY_VERSION --build-arg BUNDLER_VERSION=$BUNDLER_VERSION --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:latest
docherhub:
stage: dockerhub
script:
- docker pull $CI_REGISTRY_IMAGE:latest
- docker tag $CI_REGISTRY_IMAGE:latest lcxat/$CI_REGISTRY_IMAGE:latest
- docker login -u $HUB_REGISTRY_USER -p $HUB_REGISTRY_PASSWORD $HUB_REGISTRY
- docker push $IMAGE_TAG
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment