Sep 23, 2020 - Chrissie Buchanan    

How to use GitLab’s CI/CD pipeline templates

Learn how pipeline templates and Auto DevOps can get you up and running on GitLab CI/CD.

Writing deployment pipelines from scratch is a real pain in the branch. We want to make the continuous integration experience more automatic so teams can get up and running quickly with GitLab CI/CD.

An easy way to get started is with GitLab’s CI/CD pipeline templates. Pipeline templates come in more than 30 popular programming languages and frameworks. We’ll show you how to use these pipeline templates for your specific needs.

For an even more automatic continuous integration experience, we also offer Auto DevOps that does much of the legwork for you. Auto DevOps runs on pipelines automatically when a Dockerfile or matching buildpack exists, and identifies dependencies automatically.

What are CI pipeline templates?

Pipelines are an integral component of both continuous integration (CI) and continuous delivery (CD), and continuous deployment (the other "CD"). A deployment pipeline consists of two things:

  • Jobs, which define what to do. For example, jobs that compile or test code.
  • Stages, which define when to run the jobs. For example, stages that run tests after stages that compile the code.

Pipelines consist of one or more stages that run in order and can each contain one or more jobs that run in parallel. These jobs (or scripts) get run by agents, such as a GitLab Runner.

At GitLab, pipelines are defined in a gitlab-ci.yml file. CI/CD templates incorporate your favorite programming language or framework into this YAML file. Instead of building pipelines from scratch, CI/CD templates simplify the process by having parameters already built-in.

You can choose one of these templates when you create a gitlab-ci.yml file in the UI.

GitLab CI pipeline templates

Because our CI/CD templates come in more than 30 popular languages, the chances are good that we have the template you need to get started in our CI template repository.

Single application CI/CD How to reduce costly integrations and plug-in maintenance.

What is Auto DevOps?

Auto DevOps is a GitLab-exclusive feature that provides predefined CI/CD configurations that automatically detect, build, test, deploy, and monitor your applications. Rather than just accessing a template, Auto DevOps is a setting within your GitLab instance that is enabled by default.

Our product vision for Auto DevOps is that everything is fully connected as part of one great GitLab experience. The term Auto DevOps actually comes from the different parts that are automated by Auto DevOps:

  • "Auto CI" – Compile and test software based on best practices for the most common languages and frameworks.
  • "Auto review" – Automatic analysis tools like Code Climate.
  • "Auto deploy" – Based on Review Apps and incremental rollouts on Kubernetes clusters.
  • "Auto metrics" – Collect statistical data from all the previous steps in order to guarantee performances and optimization of the whole process.

Auto DevOps provides great defaults for all the stages and makes use of CI templates. You can customize Auto DevOps to meet your needs, and manage Auto DevOps with GitLab APIs.

Learn more about Auto DevOps, check out this video:

Other CI/CD resources

GitLab also provides CI/CD examples so you can learn how to implement GitLab CI/CD for your specific use case. In addition to template files, you can find repositories with sample projects, and step-by-step tutorials for a variety of scenarios, including:

With CI/CD templates and our Auto DevOps product feature, teams can start reaping the benefits of continuous integration without all of the manual configurations. For teams managing sometimes hundreds of projects, it’s not realistic or doable to start from scratch. And with GitLab, you don’t have to.

Curious about our best-in-class continuous integration? Try GitLab free for 30 days.

Cover image by chuttersnap on Unsplash

Free eBook: The benefits of single application CI/CD Download the ebook to learn how you can utilize CI/CD without the costly integrations or plug-in maintenance. Learn more Arrow

Try all GitLab features - free for 30 days

GitLab is more than just source code management or CI/CD. It is a full software development lifecycle & DevOps tool in a single application.

Try GitLab Free
Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license

Try GitLab risk-free for 30 days.

No credit card required. Have questions? Contact us.

Gitlab x icon svg