Skip to content

Commit

Permalink
[TASK] Add blog post about using DDEV in GitLab CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ochorocho committed Sep 8, 2024
1 parent bdac07b commit a72ccde
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
Binary file added public/img/blog/2024/09/ddev-blog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/content/authors/jochen-roth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Jochen Roth
firstName: Jochen
avatarUrl: https://avatars.githubusercontent.com/u/4623070
---

Jochen works at B13 creating websites based on TYPO3.
45 changes: 45 additions & 0 deletions src/content/blog/ddev-in-gitlab-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "Using DDEV in GitLab CI"
pubDate: 2024-09-06
modifiedDate: 2024-09-06
summary: Run DDEV within your GitLab CI pipeline.
author: Jochen Roth
featureImage:
src: /img/blog/2024/09/ddev-blog.png
alt: DDEV running in the GitLab Pipeline
credit: "[Milad Fakurian](https://unsplash.com/de/@fakurian) (Background)"
categories:
- DevOps
---

Now you can use DDEV for CI on Gitlab. Spin up your entire tech stack including services (e.g. Solr, RabbitMQ)
required to run the Website within the CI. Even e2e testing is easily possible (e.g. Cypress, Playwright).

The same DDEV config can be used locally (shared across the team) and within the GitLab CI.

On GitHub Actions this is already possible though [ddev/github-action-setup-ddev](https://github.com/ddev/github-action-setup-ddev).

# How to run DDEV in GitLab CI?

Many of you might be familiar with Docker in Docker (DinD). With DinD, Docker can run inside
the GitLab Runner using the Docker executor.

To run DDEV, a Docker image with DDEV installed ([ochorocho/ddev-gitlab-ci](https://github.com/ochorocho/ddev-gitlab-ci))
and additional configuration is required.

Depending on your setup it requires different steps.

* gitlab.com: Just works
* Self-hosted GitLab requires additional configuration for the Runner (`/etc/gitlab-runner/config.toml`)

On GitHub, you'll find tested configuration examples for

* [gitlab.com](https://github.com/ochorocho/ddev-gitlab-ci/blob/main/docs/gitlab-com.md)
* [Docker in Docker](https://github.com/ochorocho/ddev-gitlab-ci/blob/main/docs%2Fdocker.md)
* [Docker in Podman](https://github.com/ochorocho/ddev-gitlab-ci/blob/main/docs/podman.md)

Once you configured the runner correctly and extended the `.gitlab-ci.yml` with a dedicated
DDEV job you are good to go.

The [GitLab project template for TYPO3](https://gitlab.com/gitlab-org/project-templates/typo3-distribution/-/blob/main/.template/gitlab-ci-project-template.yml?ref_type=heads#L10-42)
is using DDEV in CI already.

0 comments on commit a72ccde

Please sign in to comment.