Components are published to the docker image registry to make them available for deployment. In this guide, we will show you how to add gitlab ci/cd configuration.
**Most of these examples require to add variables in the GitLab CI/CD variables. This requires to have the necessary permissions in the GitLab project.**
## Table of contents
-[Gitlab CI/CD configuration for docker image publishing](#gitlab-ci-cd-configuration-for-docker-image-publishing)
-[Gitlab CI/CD configuration for semantic versioning](#gitlab-ci-cd-configuration-for-semantic-versioning)
-[Gitlab CI/CD configuration with RenovateBot trigger](#gitlab-ci-cd-configuration-with-renovatebot-trigger)
## Gitlab CI/CD configuration for docker image publishing
The following is an example of a `.gitlab-ci.yml` file that publishes a docker image to the docker image registry.
```yaml
# variables in the GitLab CI/CD variables:
# - CI_REGISTRY_USER for artifact.tecnalia.com
# - CI_REGISTRY_PASSWORD for artifact.tecnalia.com
GIT_LFS_SKIP_SMUDGE:"1"# We dissable lfs smudge to avoid downloading large files
docker-dind-build:
variables:
GIT_SUBMODULE_STRATEGY:recursive# this repo uses submodules
GIT_SUBMODULE_DEPTH:1
```
## Gitlab CI/CD configuration with RenovateBot trigger
The following is an example of a `.gitlab-ci.yml` file that uses semantic versioning to publish a docker image to the docker image registry and triggers RenovateBot to update the dependencies.
```yaml
# variables in the GitLab CI/CD variables:
# - CI_REGISTRY_USER for artifact.tecnalia.com
# - CI_REGISTRY_PASSWORD for artifact.tecnalia.com