1. Configure the default Browser Performance Testing CI job as follows in your `.gitlab-ci.yml` file:
1. Configure the default Browser Performance Testing CI/CD job as follows in your `.gitlab-ci.yml` file:
```yaml
```yaml
include:
include:
...
@@ -75,17 +75,19 @@ using Docker-in-Docker.
...
@@ -75,17 +75,19 @@ using Docker-in-Docker.
URL:https://example.com
URL:https://example.com
```
```
NOTE:
WARNING:
For versions before 12.4, see the information for [older GitLab versions](#gitlab-versions-123-and-older).
In GitLab 14.0 and later, the job [is scheduled to be renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/225914)
If you are using a Kubernetes cluster, use [`template: Jobs/Browser-Performance-Testing.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.gitlab-ci.yml)
from `performance` to `browser_performance`.
instead.
The above example creates a `performance` job in your CI/CD pipeline and runs
The above example:
sitespeed.io against the webpage you defined in `URL` to gather key metrics.
The example uses a CI/CD template that is included in all GitLab installations since
- Creates a `performance` job in your CI/CD pipeline and runs sitespeed.io against the webpage you
12.4, but it doesn't work with Kubernetes clusters. If you are using GitLab 12.3
defined in `URL` to gather key metrics.
or older, you must [add the configuration manually](#gitlab-versions-123-and-older)
- Uses a template that doesn't work with Kubernetes clusters. If you are using a Kubernetes cluster,
use [`template: Jobs/Browser-Performance-Testing.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.gitlab-ci.yml)
instead.
- Uses a CI/CD template that is included in all GitLab installations since 12.4. If you are using
GitLab 12.3 or earlier, you must [add the configuration manually](#gitlab-versions-132-and-earlier).
The template uses the [GitLab plugin for sitespeed.io](https://gitlab.com/gitlab-org/gl-performance),
The template uses the [GitLab plugin for sitespeed.io](https://gitlab.com/gitlab-org/gl-performance),
and it saves the full HTML sitespeed.io report as a [Browser Performance report artifact](../../../ci/yaml/README.md#artifactsreportsperformance)
and it saves the full HTML sitespeed.io report as a [Browser Performance report artifact](../../../ci/yaml/README.md#artifactsreportsperformance)
...
@@ -181,63 +183,62 @@ performance:
...
@@ -181,63 +183,62 @@ performance:
URL:environment_url.txt
URL:environment_url.txt
```
```
### GitLab versions 12.3 and older
### GitLab versions 13.2 and earlier
Browser Performance Testing has gone through several changes since it's introduction.
Browser Performance Testing has gone through several changes since its introduction.
In this section we detail these changes and how you can run the test based on your
In this section we detail these changes and how you can run the test based on your
GitLab version:
GitLab version:
- In 13.2 the feature was renamed from `Performance` to `Browser Performance` with additional
template CI/CD variables.
- In GitLab 12.4 [a job template was made available](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Verify/Browser-Performance.gitlab-ci.yml).
- In GitLab 12.4 [a job template was made available](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Verify/Browser-Performance.gitlab-ci.yml).
- In 13.2 the feature was renamed from `Performance` to `Browser Performance` with
additional template CI/CD variables. The job name in the template is still `performance`
for compatibility reasons, but may be renamed to match in a future iteration.
- For 11.5 to 12.3 no template is available and the job has to be defined manually as follows:
- For 11.5 to 12.3 no template is available and the job has to be defined manually as follows: