GitLab CI/CD examples

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

This page contains links to a variety of examples that can help you understand how to implement GitLab CI/CD for your specific use case.

Examples are available in several forms. As a collection of:

CI/CD examples

The following table lists examples with step-by-step tutorials that are contained in this section:

Use caseResource
Deployment with DplUsing dpl as deployment tool.
GitLab PagesSee the GitLab Pages documentation for a complete example of deploying a static site.
Multi project pipelineBuild, test deploy using multi project pipeline.
npm with semantic-releasePublish npm packages to the GitLab package registry using semantic-release.
PHP with npm, SCPRunning Composer and npm scripts with deployment via SCP in GitLab CI/CD.
PHP with PHPUnit, atoumTesting PHP projects.
Secrets management with VaultAuthenticating and Reading Secrets With HashiCorp Vault.

Contributed examples

You can help people that use your favorite programming language by submitting a link to a guide for that language. These contributed guides are hosted externally or in separate example projects:

Use caseResource
ClojureTest a Clojure application with GitLab CI/CD.
Game developmentDevOps and Game Development with GitLab CI/CD.
Java with MavenHow to deploy Maven projects to Artifactory with GitLab CI/CD.
Java with Spring BootDeploy a Spring Boot application to Cloud Foundry with GitLab CI/CD.
Parallel testing Ruby & JSGitLab CI/CD parallel jobs testing for Ruby & JavaScript projects.
Python on HerokuTest and deploy a Python application with GitLab CI/CD.
Ruby on HerokuTest and deploy a Ruby application with GitLab CI/CD.
Scala on HerokuTest and deploy a Scala application to Heroku.

CI/CD templates

Get started with GitLab CI/CD and your favorite programming language or framework by using a .gitlab-ci.yml template.

When you create a .gitlab-ci.yml file in the UI, you can choose one of these templates:

If a programming language or framework template is not in this list, you can contribute one. To create a template, submit a merge request to the templates list.

Adding templates to your GitLab installation

  • Tier: Premium, Ultimate
  • Offering: GitLab Self-Managed, GitLab Dedicated

You can add custom examples and templates to your instance. Your GitLab administrator can designate an instance template repository that contains examples and templates specific to your organization.

Other resources

This section provides further resources to help you get familiar with various uses of GitLab CI/CD. Older articles and videos may not reflect the state of the latest GitLab release.

CI/CD in the cloud

For examples of setting up GitLab CI/CD for cloud-based environments, see:

See also the following video overviews:

Customer stories

For some customer experiences with GitLab CI/CD, see:

Getting started

For some examples to help get you started, see:

Implementing GitLab CI/CD

For examples of others who have implemented GitLab CI/CD, see:

Migrating to GitLab from third-party CI tools

Examples of migration to GitLab CI/CD from other tools:

Integrating GitLab CI/CD with other systems

To see how you can integrate GitLab CI/CD with third-party systems, see:

Mobile development

For help with using GitLab CI/CD for mobile application development, see: