GitLab

GitHub and GitLab: Diagrams in Markdown

recently announced a great new feature that allows for generating diagrams within markdown. I tested this out and it also works in .

If you’re writing a lot of documentation in markdown, as you probably are if you’re using GitHub or GitLab, this can be really nice when you need diagrams, like mapping out your CI/CD system or server maps. You can build diagrams much faster than putting something together in Photoshop or some other diagramming tool that exports an image which you then need to upload.

Continue Reading GitHub and GitLab: Diagrams in Markdown

Drupal: Sync Configuration

Having a workflow that keeps your code in sync across development, staging, and production servers – like in the series of GitLab DevOps posts I’ve been sharing recently – is important. But that doesn’t synchronize the database, which contains two major subcategories: configuration and content. It also doesn’t synchronize user-uploaded files, but that’s a subject for a different post.

Fortunately, Drupal 8 introduced a new system for syncing configuration across copies of the site.

Continue Reading Drupal: Sync Configuration

GitLab DevOps: GitLab Runner

This relates to the GitLab DevOps process. can automate deployment to a server, meaning that you do not have to log in to that server separately to pull the changes and carry out any other needed steps for the installation.

But there’s a catch: if your server is not publicly-accessible, such as behind a VPN, which is pretty common for development and staging servers, you’ll need to install a runner. This is because GitLab cannot initialize a connection to a hidden server, so the server will have to start the connection instead.

Continue Reading GitLab DevOps: GitLab Runner

GitLab DevOps: PHP Lint

Here’s another piece in a GitLab DevOps setting: when code is committed to , I want to run a linter on the custom code folders of Drupal (modules and themes) to make sure there aren’t any glaring syntax bugs that snuck through. My personal favourite error is when a “:wq” gets inserted into a file trying to exit vim, after doing all the testing.

Continue Reading GitLab DevOps: PHP Lint

Drupal GitPod Container 1: .Dockerfile

GitPod is a great tool for cloud-based containers when developing. If you’re developing and want a safe and efficient cloud container to try things out, it’s a pretty good way to go. You even get 50 hours per month for free, which is pretty great if you only need occasional side project and not full-time work. It also works with Visual Studio Code – although that has not been working for me lately – so you can use it in the browser or in your desktop editor. When you browse to a or repository with the extension installed, there’s a simple button that will launch the container with that repository’s code, making it quick and easy to see how it works as well as make changes.

In this mini-series I describe how I created a generic Drupal-friendly container working with . It is available in my GitHub. Note that since is some code I may continue using over time, the code there may change beyond what is covered in this article.

Continue Reading Drupal GitPod Container 1: .Dockerfile