Integrating Gitlab into your Development Workflow

Gitlab Sep 26, 2019

Gitlab is primarily an Open Source software enabling git code hosting in the cloud or on premise. Apart from their "main goal" of providing you with excellent hosting and management for your code, Gitlab offers a lot additional functionality for its users. Using their cloud services they are basically able to handle your whole DevOps lifecycle for you.

Today we are having a look at how it's possible to integrate Gitlab within your agile development workflow.

Integrations

There are 2 kinds of integrations present at the moment.

  1. Custom integrations using webhooks
  2. Pre-made integrations for specific tools or software services

Custom integrations provide you with a lot more flexibility than pre-made integrations, because they are universally usable. But sometimes it's a little more tricky to get the 2 communicating systems working together properly.

Pre-made integrations for specific software to the rescue. They are very easy to set up, but not every software you'd like to integrate into your workflow may have a pre-made integration for Gitlab.

Custom integrations

Custom integrations using Webhooks provide you with the bare minimum of "integration comfort". You are able to specify a URL for the hook, and a secret.

Additionally you should specify all the trigger actions the application is capable of receiving from Gitlab. If you are not in an testing environment, you should also always check "Enable SSL verification".

An example of an custom integration would be Aurorias Version Control Integration Feature.

Pre-made integrations

Pre made integrations are a bit more straight forward, since the "connection" setup part of the task has already been done by the developer programming the integration.

Here are our top 3 pre made integrations of Gitlab which are very likely going to benefit your development workflow.

Mails on Push

The "Emails on push" integration does just what the name implies, it sends you or your team an email whenever a push to the Gitlab Server occurs in your codebase.

It informs you on which branch the push has happened, which commits have been pushed (including information such as commitee, date and commit message). Also, it tells you in an aggregated form which files have changed in those commits, and the coolest info of it all...

It shows you the code that has changed, within the email itself. You don't have to click a link, or search for those commits on Gitlab itself. It's all already there, within that one mail.

This makes it the perfect tool for quick and no hard feelings code reviews when there is no real time to do proper merge request code reviews. Nobody is blocked by some merge requests that would need to be accepted.

You are entrusting the people in your team with more responsibility for their code, still having the chance to review the code quality and discuss it later.

Obviously this means lots of emails. And it seems people tend to not really like emails a lot, but setting up some basic filters for your inbox, letting only mails for specific projects and specific branches in and categorizing them automatically will calm the storm of mails rushing into your mailbox, and give yourself peace of mind when checking for new mails.

Slack notifications

Slack or other messaging platforms are revolutionizing the way people in companies are communicating with each other. When not so long ago everything was documented and communicated via emails, it felt a bit slow, clunky and sometimes even burdensome.

Slack changed this completely, nowadays it replaces nearly every communication channel within a company, making it the main communication tool for nearly all usecases.

With the slack notifications integration enabled, you are able to directly receive notifications in slack channels when something in your codebase happens.

You are for example able to post into a specific channel whenever, just like the Emails on push feature, someone pushes code in your codebase. So that people can be aware of what happens in the codebase, without having an eye on the commits all the time.

But this is just one of the options it is providing to the "integrators". Basically you are able to be informed about

  • Push events
  • Issue changes (Yes, Gitlab has a board too with which you are able to track basic progress)
  • Merge requests
  • Pipeline triggers
  • Deployments
  • Wiki Page changes
  • and still a lot more...

Pushover

Pushover as a service, allows you to simply push notifications to your devices easily, be it Android, iOS or Desktop. By signing & setting up Pushover for your devices you are able to integrate your your development workflow and codebase information with your handheld devices.

This way you can be informed about all the kinds of status changes gitlab has to offer.

  • Would like to receive a notification when your pipeline failes? No problem.
  • Would like to be informed whenever a new merge request is being created or your merge request is being accepted / rejected? No big deal.

This allows developers and managers to stay flexible, not always having to carry around their notebooks to stay on top of what is happening in the project.

One for our own - Version Control Integration

Of course, we'd also like to mention here our very own Gitlab custom integration, the Auroria Version Control Integration with which it is possible in an all flexible way to link your commits and branches to the tasks and stories you are working on.

Making it straight forward to review userstories and tasks, line by line. Even changing the status of your tasks by just writing a commit message is a piece of cake.

Just enabling the feature for your project will do the trick. After that you are presented with the Webhook URL and the Secret you should hand over to Gitlab in order to get the connection going. After that you are also able to define Regular Expressions for the patterns you would like to use in your commit messages.

With this pattern we are able to link the commits you are doing, to the tasks they are referring to.

It's also possible to define a pattern for status changes. So that you are actually moving tasks on the board, just with the power of your commit messages.

This for example enables you to write commit messages like:

fix: adds filter logic for project type back in
Task: #846
New status: done

Which in turn would link the current commit to the task #846 and change the status of the task to Done.

Congratulations!

Nice, we hope you enjoyed our walk through and explanations of how to enhance your development workflows with Gitlab! See you soon!

Tags

Nico Filzmoser

Hi! I'm Nico 😊 I'm a technology enthusiast, passionate software engineer with a strong focus on standards, best practices and architecture… I'm also very much into Machine Learning 🤖