Skip to content
Snippets Groups Projects
Commit a208928b authored by Thomas Schneider's avatar Thomas Schneider
Browse files

Add GitLab CI config

parent fa7bdcc4
No related branches found
No related tags found
No related merge requests found
Pipeline #827 failed
image: docker:stable
variables:
# When using dind service we need to instruct docker, to talk with the
# daemon started inside of the service. The daemon is available with
# a network connection instead of the default /var/run/docker.sock socket.
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
#
# Note that if you're using Kubernetes executor, the variable should be set to
# tcp://localhost:2375 because of how Kubernetes executor connects services
# to the job container
DOCKER_HOST: tcp://docker:2375/
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
services:
- docker:dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker info
build:
stage: build
tags:
- dind
script:
- docker pull $CI_REGISTRY_IMAGE/fsmpi-base:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE/fsmpi-base:latest --tag $CI_REGISTRY_IMAGE/fsmpi-base:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE/fsmpi-base:stretch --tag $CI_REGISTRY_IMAGE/fsmpi-base:latest .
- docker push $CI_REGISTRY_IMAGE/fsmpi-base:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/fsmpi-base:stretch
- docker push $CI_REGISTRY_IMAGE/fsmpi-base:latest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment