Merge branch 'better-autodevops-customization-documentation' into 'master'
Docs/Comments only: Better autodevops customization documentation See merge request gitlab-org/gitlab-ce!30247
This commit is contained in:
commit
66913cb291
|
@ -175,8 +175,8 @@ When using Auto DevOps, you may want to deploy different environments to
|
||||||
different Kubernetes clusters. This is possible due to the 1:1 connection that
|
different Kubernetes clusters. This is possible due to the 1:1 connection that
|
||||||
[exists between them](../../user/project/clusters/index.md#multiple-kubernetes-clusters-premium).
|
[exists between them](../../user/project/clusters/index.md#multiple-kubernetes-clusters-premium).
|
||||||
|
|
||||||
In the [Auto DevOps template](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml)
|
In the [Auto DevOps template] (used behind the scenes by Auto DevOps), there
|
||||||
(used behind the scenes by Auto DevOps), there are currently 3 defined environment names that you need to know:
|
are currently 3 defined environment names that you need to know:
|
||||||
|
|
||||||
- `review/` (every environment starting with `review/`)
|
- `review/` (every environment starting with `review/`)
|
||||||
- `staging`
|
- `staging`
|
||||||
|
@ -662,25 +662,32 @@ to the desired environment. See [Limiting environment scopes of variables](../..
|
||||||
|
|
||||||
### Customizing `.gitlab-ci.yml`
|
### Customizing `.gitlab-ci.yml`
|
||||||
|
|
||||||
If you want to modify the CI/CD pipeline used by Auto DevOps, you can copy the
|
Everything about Auto DevOps is customizable since the [Auto DevOps template]
|
||||||
[Auto DevOps template] into your project's repo and edit as you see fit.
|
is just an example of a [`.gitlab-ci.yml`](../../ci/yaml/README.md) and uses
|
||||||
|
only features that are available to any `.gitlab-ci.yml`.
|
||||||
|
|
||||||
Assuming that your project is new or it doesn't have a `.gitlab-ci.yml` file
|
Auto DevOps is completely customizable because the [Auto DevOps template]:
|
||||||
present:
|
|
||||||
|
|
||||||
1. From your project home page, either click on the "Set up CI/CD" button, or click
|
- Is just an implementation of a [`.gitlab-ci.yml`](../../ci/yaml/README.md) file.
|
||||||
on the plus button and (`+`), then "New file"
|
- Uses only features available to any implementation of `.gitlab-ci.yml`.
|
||||||
1. Pick `.gitlab-ci.yml` as the template type
|
|
||||||
1. Select "Auto-DevOps" from the template dropdown
|
|
||||||
1. Edit the template or add any jobs needed
|
|
||||||
1. Give an appropriate commit message and hit "Commit changes"
|
|
||||||
|
|
||||||
TIP: **Tip:** The Auto DevOps template includes useful comments to help you
|
If you want to modify the CI/CD pipeline used by Auto DevOps, you can [`include`
|
||||||
customize it. For example, if you want deployments to go to a staging environment
|
the template](../../ci/yaml/README.md#includetemplate) and customize as
|
||||||
instead of directly to a production one, you can enable the `staging` job by
|
needed. To do this, add a `.gitlab-ci.yml` file to the root of your repository
|
||||||
renaming `.staging` to `staging`. Then make sure to uncomment the `when` key of
|
containing the following:
|
||||||
the `production` job to turn it into a manual action instead of deploying
|
|
||||||
automatically.
|
```yml
|
||||||
|
include:
|
||||||
|
- template: Auto-DevOps.gitlab-ci.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add any extra changes you want. Your additions will be merged with the
|
||||||
|
[Auto DevOps template] using the behaviour described for
|
||||||
|
[`include`](../../ci/yaml/README.md#include).
|
||||||
|
|
||||||
|
It is also possible to copy and paste the contents of the [Auto DevOps
|
||||||
|
template] into your project and edit this as needed. You may prefer to do it
|
||||||
|
that way if you want to specifically remove any part of it.
|
||||||
|
|
||||||
### Using components of Auto-DevOps
|
### Using components of Auto-DevOps
|
||||||
|
|
||||||
|
|
|
@ -74,16 +74,16 @@ stages:
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- template: Jobs/Build.gitlab-ci.yml
|
- template: Jobs/Build.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml
|
||||||
- template: Jobs/Test.gitlab-ci.yml
|
- template: Jobs/Test.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Jobs/Test.gitlab-ci.yml
|
||||||
- template: Jobs/Code-Quality.gitlab-ci.yml
|
- template: Jobs/Code-Quality.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml
|
||||||
- template: Jobs/Deploy.gitlab-ci.yml
|
- template: Jobs/Deploy.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
|
||||||
- template: Jobs/Browser-Performance-Testing.gitlab-ci.yml
|
- template: Jobs/Browser-Performance-Testing.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.gitlab-ci.yml
|
||||||
- template: Security/DAST.gitlab-ci.yml
|
- template: Security/DAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml
|
||||||
- template: Security/Container-Scanning.gitlab-ci.yml
|
- template: Security/Container-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
|
||||||
- template: Security/Dependency-Scanning.gitlab-ci.yml
|
- template: Security/Dependency-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
|
||||||
- template: Security/License-Management.gitlab-ci.yml
|
- template: Security/License-Management.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml
|
||||||
- template: Security/SAST.gitlab-ci.yml
|
- template: Security/SAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
|
||||||
|
|
||||||
# Override DAST job to exclude master branch
|
# Override DAST job to exclude master branch
|
||||||
dast:
|
dast:
|
||||||
|
|
Loading…
Reference in New Issue