The platform takes deployment completely off your plate. You work with Git as usual – everything that happens after the push is already set up.
The branch model
Locally you only need two kinds of branches:
main– the main branch. Whatever lands here is rolled out to the dev server automatically.- Feature branches – one branch per change, merged back into
mainvia merge request.
flowchart LR feature["Feature branch"] -->|"Merge request"| mainBranch["main"] mainBranch -->|"Pipeline builds Docker image"| image["Docker image"] image -->|"automatic"| devServer["Dev server"] image -->|"manual click:<br/>publish-docker-prod"| prodServer["Prod server"]
Step by step: developing a change
- Create a feature branch:
git checkout main
git pull
git checkout -b feature/my-feature
- Make your changes, commit, and push:
git add .
git commit -m "feat: my feature"
git push -u origin feature/my-feature
- Create a merge request into
mainin GitLab. The pipeline builds and checks your branch automatically. - Merge the merge request – done. The platform handles the rest.
What happens after the merge (dev)
As soon as your code is in main, the repository’s pipeline runs automatically:
update-version– computes the new version number.build-docker– builds the Docker image and pushes it to the registry.publish-docker-dev– writes the new image tag intoconfigurations/dev/versions.yamlof yourgitops-configurationrepository.- The GitOps repository then deploys the new version to the dev server via Ansible.
No action needed – a few minutes after the merge, your change is live on dev. You can follow the progress in GitLab under CI/CD → Pipelines (in the code repository and in the gitops-configuration repository).
Rolling out to production
The prod deployment is intentionally a manual step – the same build that already runs on dev is released with one click:
- Open your code repository in GitLab and go to CI/CD → Pipelines.
- Open the pipeline of the
mainstate you want to release. - Start the
publish-docker-prodjob via the play button.
The job writes the image tag into configurations/prod/versions.yaml, and the GitOps repository rolls the version out to the prod server.
publish-docker-prod releases exactly the state of that pipeline. Before clicking, verify that the change works as expected on dev.Feature branches and previews
The pipeline also builds a Docker image on feature branches (publish-docker-dynamic). This makes it possible to test a branch in its own environment before merging.
See also
- Getting started – create a project and run it locally.
- Environments & variables – how dev and prod are configured.
- Architecture – how pipelines, GitOps, and servers fit together.