stage | group | info |
---|---|---|
Deploy |
Environments |
To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments |
- Introduced in GitLab 11.0.
- Support for the GitLab agent was introduced in GitLab 14.5.
GitLab Auto DevOps is a collection of pre-configured features and integrations that work together to support your software delivery process.
Auto DevOps detects your programming language and uses CI/CD templates to create and run default pipelines to build and test your application. Then, you can configure deployments to deploy your apps to staging and production, and set up Review Apps to preview your changes per branch.
You can use default settings to quickly ship your apps, and iterate and customize later.
You can also manage Auto DevOps with APIs.
For an introduction to Auto DevOps, watch Auto DevOps in GitLab 11.0.
Auto DevOps supports development during each of the DevOps stages.
Stage | Auto DevOps feature |
---|---|
Build | Auto Build |
Build | Auto Dependency Scanning |
Test | Auto Test |
Test | Auto Browser Performance Testing |
Test | Auto Code Intelligence |
Test | Auto Code Quality |
Test | Auto Container Scanning |
Test | Auto License Compliance |
Deploy | Auto Review Apps |
Deploy | Auto Deploy |
Secure | Auto Dynamic Application Security Testing (DAST) |
Secure | Auto Static Application Security Testing (SAST) |
Secure | Auto Secret Detection |
Auto DevOps provides features often included in an application platform or in a Platform as a Service (PaaS).
Inspired by Heroku, Auto DevOps goes beyond it in multiple ways:
- Auto DevOps works with any Kubernetes cluster.
- There is no additional cost.
- You can use a cluster hosted by yourself or on any public cloud.
- Auto DevOps offers an incremental graduation path. If you need to customize, start by changing the templates and evolve from there.
To get started, you only need to enable Auto DevOps. This is enough to run an Auto DevOps pipeline to build and test your application.
If you want to build, test, and deploy your app:
- Introduced in GitLab 11.3, Auto DevOps is enabled by default.
- Introduced in GitLab 12.7, Auto DevOps runs pipelines automatically only if a
Dockerfile
or matching buildpack exists.
Depending on your instance type, you can enable or disable Auto DevOps at the following levels:
Instance type | Project | Group | Instance (Admin Area) |
---|---|---|---|
GitLab SaaS | {check-circle} Yes | {check-circle} Yes | {dotted-circle} No |
GitLab self-managed | {check-circle} Yes | {check-circle} Yes | {check-circle} Yes |
Before enabling Auto DevOps, consider preparing it for deployment. If you don't, Auto DevOps can build and test your app, but cannot deploy it.
To use Auto DevOps for individual projects, you can enable it in a project-by-project basis. If you intend to use it for more projects, you can enable it for a group or an instance. This can save you the time of enabling it in each project.
Prerequisites:
- You must have at least the Maintainer role for the project.
- Ensure your project does not have a
.gitlab-ci.yml
present. If present, your CI/CD configuration takes precedence over the Auto DevOps pipeline.
To enable Auto DevOps for a project:
- On the left sidebar, at the top, select Search GitLab ({search}) to find your project.
- Select Settings > CI/CD.
- Expand Auto DevOps.
- Select the Default to Auto DevOps pipeline checkbox.
- Optional but recommended. Add the base domain.
- Optional but recommended. Choose the deployment strategy.
- Select Save changes.
GitLab triggers the Auto DevOps pipeline on the default branch.
To disable it, follow the same process and clear the Default to Auto DevOps pipeline checkbox.
Introduced in GitLab 11.10.
When you enable Auto DevOps at the group level, the subgroups and projects in that group inherit the configuration. You can save time by enabling Auto DevOps for a group instead of enabling it for each subgroup or project.
When enabled for a group, you can still disable Auto DevOps for the subgroups and projects where you don't want to use it.
Prerequisites:
- You must have the Owner role for the group.
To enable Auto DevOps for a group:
- On the left sidebar, at the top, select Search GitLab ({search}) to find your group.
- Select Settings > CI/CD.
- Expand Auto DevOps.
- Select the Default to Auto DevOps pipeline checkbox.
- Select Save changes.
To disable Auto DevOps at the group level, follow the same process and clear the Default to Auto DevOps pipeline checkbox.
After enabling Auto DevOps at the group level, you can trigger the Auto DevOps pipeline for any project that belongs to that group:
- On the left sidebar, at the top, select Search GitLab ({search}) to find your project.
- Make sure the project doesn't contain a
.gitlab-ci.yml
file. - Select Build > Pipelines.
- To trigger the Auto DevOps pipeline, select Run pipeline.
To enable Auto DevOps by default for all projects, you can enable it at the instance level. You can still disable Auto DevOps for each group and project where you don't want to run it.
Even when disabled for an instance, group Owners and project Maintainers can still enable Auto DevOps at the group and project levels.
Prerequisites:
- You must be an administrator for the instance.
To enable Auto DevOps for your instance:
- On the left sidebar, expand the top-most chevron ({chevron-down}).
- Select Admin Area.
- Select Settings > CI/CD.
- Expand Auto DevOps.
- Select the Default to Auto DevOps pipeline checkbox.
- Optional. Add the Auto DevOps base domain.
- Select Save changes.
When enabled, Auto DevOps attempts to run pipelines in every project. If the pipeline fails in a particular project, it disables itself. GitLab administrators can change this in the Auto DevOps settings.
If a CI/CD configuration file is present, it remains unchanged and Auto DevOps does not affect it.
To disable Auto DevOps in the instance level, follow the same process and clear the Default to Auto DevOps pipeline checkbox.
- Use Auto DevOps to deploy to a Kubernetes cluster on Google Kubernetes Engine (GKE)
- Use Auto DevOps to deploy to a Kubernetes cluster on Amazon Elastic Kubernetes Service (EKS)
- Use Auto DevOps to deploy to EC2
- Use Auto DevOps to deploy to ECS
When updating GitLab, you might need to upgrade Auto DevOps dependencies to match your new GitLab version:
- Upgrading Auto DevOps resources:
- Auto DevOps template.
- Auto Deploy template.
- Auto Deploy image.
- Helm.
- Kubernetes.
- Environment variables.
- Upgrading PostgreSQL.
There is no guarantee that you can use a private container registry with Auto DevOps.
Instead, use the GitLab Container Registry with Auto DevOps to simplify configuration and prevent any unforeseen issues.
The GitLab integration with Helm does not support installing applications when behind a proxy.
If you want to do so, you must inject proxy settings into the installation pods at runtime.