Commit 52d3e6f0 authored by drew cimino's avatar drew cimino

Revise Browser Performance Testing template docs

parent bc8f9fcc
......@@ -3524,12 +3524,12 @@ as artifacts.
The collected Metrics report uploads to GitLab as an artifact and displays in merge requests.
##### `artifacts:reports:performance` **(PREMIUM)**
##### `artifacts:reports:browser_performance` **(PREMIUM)**
> - Introduced in GitLab 11.5.
> - Requires GitLab Runner 11.5 and above.
The `performance` report collects [Browser Performance Testing metrics](../../user/project/merge_requests/browser_performance_testing.md)
The `browser_performance` report collects [Browser Performance Testing metrics](../../user/project/merge_requests/browser_performance_testing.md)
as artifacts.
The collected Browser Performance report uploads to GitLab as an artifact and displays in merge requests.
......
......@@ -431,7 +431,7 @@ The following table lists variables used to disable jobs.
| `license_scanning` | `LICENSE_MANAGEMENT_DISABLED` | [From GitLab 12.8](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/22773) | If the variable is present, the job isn't created. |
| `load_performance` | `LOAD_PERFORMANCE_DISABLED` | From GitLab 13.2 | If the variable is present, the job isn't created. |
| `nodejs-scan-sast` | `SAST_DISABLED` | | If the variable is present, the job isn't created. |
| `performance` | `BROWSER_PERFORMANCE_DISABLED` | From GitLab 11.0 | Browser performance. If the variable is present, the job isn't created. |
| `browser_performance` | `BROWSER_PERFORMANCE_DISABLED` | From GitLab 11.0 | Browser performance. If the variable is present, the job isn't created. |
| `phpcs-security-audit-sast` | `SAST_DISABLED` | | If the variable is present, the job isn't created. |
| `pmd-apex-sast` | `SAST_DISABLED` | | If the variable is present, the job isn't created. |
| `retire-js-dependency_scanning` | `DEPENDENCY_SCANNING_DISABLED` | | If the variable is present, the job isn't created. |
......
......@@ -40,11 +40,11 @@ Consider the following workflow:
## How browser performance testing works
First, define a job in your `.gitlab-ci.yml` file that generates the
[Browser Performance report artifact](../../../ci/yaml/README.md#artifactsreportsperformance).
[Browser Performance report artifact](../../../ci/yaml/README.md#artifactsreportsbrowserperformance).
GitLab then checks this report, compares key performance metrics for each page
between the source and target branches, and shows the information in the merge request.
For an example Performance job, see
For an example Browser Performance job, see
[Configuring Browser Performance Testing](#configuring-browser-performance-testing).
NOTE:
......@@ -70,18 +70,17 @@ using Docker-in-Docker.
include:
template: Verify/Browser-Performance.gitlab-ci.yml
performance:
brwoser_performance:
variables:
URL: https://example.com
```
WARNING:
In GitLab 14.0 and later, the job [is scheduled to be renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/225914)
from `performance` to `browser_performance`.
In GitLab 13.12 and earlier, the job [was named](https://gitlab.com/gitlab-org/gitlab/-/issues/225914) `performance`.
The above example:
- Creates a `performance` job in your CI/CD pipeline and runs sitespeed.io against the webpage you
- Creates a `browser_performance` job in your CI/CD pipeline and runs sitespeed.io against the webpage you
defined in `URL` to gather key metrics.
- 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)
......@@ -108,7 +107,7 @@ makes on the given URL, and change the version:
include:
template: Verify/Browser-Performance.gitlab-ci.yml
performance:
browser_performance:
variables:
URL: https://www.sitespeed.io/
SITESPEED_VERSION: 13.2.0
......@@ -127,7 +126,7 @@ if the `Total Score` metric degrades by 5 points or more:
include:
template: Verify/Browser-Performance.gitlab-ci.yml
performance:
browser_performance:
variables:
URL: https://example.com
DEGRADATION_THRESHOLD: 5
......@@ -140,13 +139,13 @@ The `Total Score` metric is based on sitespeed.io's [coach performance score](ht
The above CI YAML configuration is great for testing against static environments, and it can
be extended for dynamic environments, but a few extra steps are required:
1. The `performance` job should run after the dynamic environment has started.
1. The `browser_performance` job should run after the dynamic environment has started.
1. In the `review` job:
1. Generate a URL list file with the dynamic URL.
1. Save the file as an artifact, for example with `echo $CI_ENVIRONMENT_URL > environment_url.txt`
in your job's `script`.
1. Pass the list as the URL environment variable (which can be a URL or a file containing URLs)
to the `performance` job.
to the `browser_performance` job.
1. You can now run the sitespeed.io container against the desired hostname and
paths.
......@@ -176,7 +175,7 @@ review:
except:
- master
performance:
browser_performance:
dependencies:
- review
variables:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment