Commit dd643c8e authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

feat: build and publish the docker image on tags

parent 9680a083
image: docker:19.03.6
stages:
- build
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
services:
- name: docker:19.03.6-dind
command: ["--mtu=1458"]
build and publish the image:
stage: build
before_script:
- docker info
- echo " --------------------------------- "
script:
# Login into gitlab registry. If that fails, the script should exit
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# Get the previous version, so that we could reuse the cache
- 'docker pull $CI_REGISTRY_IMAGE:latest || true'
# Build the new version, assign new tag and `latest` tag
- docker build --cache-from $CI_REGISTRY_IMAGE:latest .
- docker build -t $CI_REGISTRY_IMAGE:$(CI_COMMIT_TAG) .
# Push the newly built version to the registry
- docker push $CI_REGISTRY_IMAGE
tags:
- privileged
rules:
- if: $CI_COMMIT_TAG
......@@ -6,8 +6,7 @@ gem "minima", "~> 2.5"
gem 'jekyll-theme-lcsb-default', '~> 0.3.3', :git => "https://git-r3lab.uni.lu/core-services/jekyll-theme-lcsb-default.git", :tag => "0.3.3"
group :jekyll_plugins do
gem "jekyll-paginate-v2", "~> 3",
:git => "https://github.com/sverrirs/jekyll-paginate-v2.git"
gem "jekyll-paginate-v2", "~> 3"
gem "jekyll-feed", "~> 0.6"
end
......
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