Skip to content
Snippets Groups Projects
Verified Commit e6096a18 authored by Karel Koci's avatar Karel Koci :metal: Committed by Josef Schlehofer
Browse files

gitlab-ci: build docker image as part of the CI

This makes Gitlab CI docker image update part of the CI run and thus in
sync with Dockerfile in repository.
parent 2cf3b4f1
Branches
Tags
2 merge requests!569Turris OS 6.0 (HBK),!533Draft: gitlab-ci: build docker image as part of the CI
image: registry.nic.cz/turris/os/build
image: $CI_REGISTRY_IMAGE
stages:
- docker
- build
- verify
## Docker stage ##################################################################
docker:
stage: docker
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/docker
services:
- $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/docker:dind
tags:
- dind
- privileged
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE || true
- docker build --pull --cache-from $CI_REGISTRY_IMAGE --tag $CI_REGISTRY_IMAGE --file .gitlab-ci/Dockerfile .gitlab-ci
- docker push $CI_REGISTRY_IMAGE
## Package build prepare #########################################################
.prepare:
stage: build
......
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