Skip to content
Snippets Groups Projects
Commit 3204401a authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Merge branch '2-build-and-publish-automatically-on-tags' into 'master'

feat: build and publish the docker image on tags

Closes #2

See merge request !6
parents 9680a083 dd643c8e
No related branches found
No related tags found
1 merge request!6feat: build and publish the docker image on tags
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment