Implement builder image

Add docker build to create a shared image for running CI pipelines and
docker builds based on debian.
This commit is contained in:
Hornwitser 2024-07-13 12:26:16 +02:00
commit c3e3ff0959
4 changed files with 64 additions and 0 deletions

17
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,17 @@
default:
image: docker:24.0.5
build:
stage: build
script:
- docker build $CI_PROJECT_DIR
--tag ${REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}
$(echo "$CI_COMMIT_TAG" | if grep -q $(date -u '+^r%g\.%-V\.\(0\|[1-9][0-9]*\)$');
then echo --tag ${REGISTRY_IMAGE}:latest;
fi)
deploy:
stage: deploy
script:
- echo "$REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $REGISTRY_USER --password-stdin
- docker push --all-tags ${REGISTRY_IMAGE}