Auto deploy

Introduced in GitLab 8.15. Currently requires a Public project.

Auto deploy is an easy way to configure GitLab CI for the deployment of your application. GitLab Community maintains a list of .gitlab-ci.yml templates for various infrastructure providers and deployment scripts powering them. These scripts are responsible for packaging your application, setting up the infrastructure and spinning up necessary services (for example a database).

You can use project services to store credentials to your infrastructure provider and they will be available during the deployment.

Supported templates

The list of supported auto deploy templates is available here.

Configuration

  1. Enable a deployment project service to store your credentials. For example, if you want to deploy to OpenShift you have to enable Kubernetes service.
  2. Configure GitLab Runner to use Docker or Kubernetes executor with privileged mode enabled.
  3. Navigate to the "Project" tab and click "Set up auto deploy" button.
    Auto deploy button
  4. Select a template.
    Dropdown with auto deploy templates
  5. Commit your changes and create a merge request.
  6. Test your deployment configuration using a Review App that was created automatically for you.