]> git.p6c8.net - jirafeau_project.git/commit
#2: Build and publish Docker images using GitLab CI. 1/head
authorErik Hubers <2598139-erikhubers@users.noreply.gitlab.com>
Sun, 11 Aug 2024 12:52:52 +0000 (14:52 +0200)
committerErik Hubers <2598139-erikhubers@users.noreply.gitlab.com>
Sun, 11 Aug 2024 12:52:52 +0000 (14:52 +0200)
commitac471fd7432906217f7a2d46b37d49b1c9f512ea
tree16fe6a1ba59ab65de3fae23efe68dbd799449e0a
parent4aa503f3fb44503b2f6fbe6abdfeaf71411e7e55
#2: Build and publish Docker images using GitLab CI.

---
Add the ability to build & publish a docker image to the Gitlab
container registry when tagging a commit.

For now we'll publish both tag (i.e. `x.x.x`) and `latest` upon trigger.

It's assumed tags are only set on the default branch and only limited
amount people have tag rights. As it publishes `latest` it's important
not to push breaking / untested releases. If required a more elaborate
setup can be created, but let's start somewhere.

For now it's assumed in README.md files we're going to publish to the
GitLab Container Registry, with $CI_REGISTRY/$CI_REGISTRY_IMAGE
variables resolving to `registry.gitlab.com/jirafeau/jirafeau`.

Changes:
- Fixup of several pre-existing linter errors in `php` files
- Cleanup `Dockerfile`, merged `COPY` & `RUN` layers leveraging BuildKit
- Added `publish` pipeline step to be triggered using `tags`
- Updated docker image related references in `README.md`
- Refactored `.gitlab-ci.yaml` to only run `before_script` for linters
.gitlab-ci.yml
Dockerfile
README.md
docker/README.md
docker/docker_config.php
index.php
lib/functions.php
script.php

patrick-canterino.de