From 88fa8399b9f420f0cc6970b5911f621ceaba89c0 Mon Sep 17 00:00:00 2001
From: Nestor Valenzuela <nvalenzuela@paciolan.com>
Date: Thu, 12 Oct 2023 21:59:52 +0000
Subject: [PATCH 1/3] Allow you to pass docker options to the Sitespeed docker;

---
 .../templates/Verify/Browser-Performance.latest.gitlab-ci.yml  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/gitlab/ci/templates/Verify/Browser-Performance.latest.gitlab-ci.yml b/lib/gitlab/ci/templates/Verify/Browser-Performance.latest.gitlab-ci.yml
index adc92fde5ae827a3..3f4c0c538507b63e 100644
--- a/lib/gitlab/ci/templates/Verify/Browser-Performance.latest.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Verify/Browser-Performance.latest.gitlab-ci.yml
@@ -19,6 +19,7 @@ browser_performance:
     SITESPEED_IMAGE: sitespeedio/sitespeed.io
     SITESPEED_VERSION: latest
     SITESPEED_OPTIONS: ''
+    SITESPEED_DOCKER_OPTIONS: ''
   services:
     - docker:dind
   script:
@@ -48,7 +49,7 @@ browser_performance:
           HTTP_PROXY \
           NO_PROXY \
         ) \
-        --shm-size=1g --rm -v "$(pwd)":/sitespeed.io $SITESPEED_IMAGE:$SITESPEED_VERSION --plugins.add ./gitlab-exporter --cpu --outputFolder sitespeed-results $URL $SITESPEED_OPTIONS
+        $SITESPEED_DOCKER_OPTIONS --shm-size=1g --rm -v "$(pwd)":/sitespeed.io $SITESPEED_IMAGE:$SITESPEED_VERSION --plugins.add ./gitlab-exporter --cpu --outputFolder sitespeed-results $URL $SITESPEED_OPTIONS
     - mv sitespeed-results/data/performance.json browser-performance.json
   artifacts:
     paths:
-- 
GitLab


From 64aecac8973d654797101cc8fae88c9cdc445c92 Mon Sep 17 00:00:00 2001
From: Nestor Valenzuela <nvalenzuela@paciolan.com>
Date: Wed, 8 Nov 2023 17:17:20 +0000
Subject: [PATCH 2/3] Update browser_performance_testing.md with
 SITESPEED_DOCKER_OPTIONS

---
 doc/ci/testing/browser_performance_testing.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/ci/testing/browser_performance_testing.md b/doc/ci/testing/browser_performance_testing.md
index 9e81f243e50665c7..2b6c2067c35d05c4 100644
--- a/doc/ci/testing/browser_performance_testing.md
+++ b/doc/ci/testing/browser_performance_testing.md
@@ -91,6 +91,7 @@ You can also customize the jobs with CI/CD variables:
 - `SITESPEED_IMAGE`: Configure the Docker image to use for the job (default `sitespeedio/sitespeed.io`), but not the image version.
 - `SITESPEED_VERSION`: Configure the version of the Docker image to use for the job (default `14.1.0`).
 - `SITESPEED_OPTIONS`: Configure any additional sitespeed.io options as required (default `nil`). Refer to the [sitespeed.io documentation](https://www.sitespeed.io/documentation/sitespeed.io/configuration/) for more details.
+- `SITESPEED_DOCKER_OPTIONS`: Configure any additional Docker options (default `nil`). Refer to the [Docker options documentation](https://docs.docker.com/engine/reference/commandline/run/#options) for more details.
 
 For example, you can override the number of runs sitespeed.io
 makes on the given URL, and change the version:
-- 
GitLab


From cbbb5f7e4e9b8aad4e136e2607a5495c753badc6 Mon Sep 17 00:00:00 2001
From: Nestor Valenzuela <nvalenzuela@paciolan.com>
Date: Wed, 8 Nov 2023 17:24:47 +0000
Subject: [PATCH 3/3] changing other browser-performance to add sitespeed
 docker options

---
 .../ci/templates/Verify/Browser-Performance.gitlab-ci.yml      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/gitlab/ci/templates/Verify/Browser-Performance.gitlab-ci.yml b/lib/gitlab/ci/templates/Verify/Browser-Performance.gitlab-ci.yml
index c1a90955f7f0f0af..8c9e0a329dd18e60 100644
--- a/lib/gitlab/ci/templates/Verify/Browser-Performance.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Verify/Browser-Performance.gitlab-ci.yml
@@ -19,6 +19,7 @@ browser_performance:
     SITESPEED_IMAGE: sitespeedio/sitespeed.io
     SITESPEED_VERSION: 26.1.0
     SITESPEED_OPTIONS: ''
+    SITESPEED_DOCKER_OPTIONS: ''
   services:
     - docker:dind
   script:
@@ -48,7 +49,7 @@ browser_performance:
           HTTP_PROXY \
           NO_PROXY \
         ) \
-        --shm-size=1g --rm -v "$(pwd)":/sitespeed.io $SITESPEED_IMAGE:$SITESPEED_VERSION --plugins.add ./gitlab-exporter --cpu --outputFolder sitespeed-results $URL $SITESPEED_OPTIONS
+        $SITESPEED_DOCKER_OPTIONS --shm-size=1g --rm -v "$(pwd)":/sitespeed.io $SITESPEED_IMAGE:$SITESPEED_VERSION --plugins.add ./gitlab-exporter --cpu --outputFolder sitespeed-results $URL $SITESPEED_OPTIONS
     - mv sitespeed-results/data/performance.json browser-performance.json
   artifacts:
     paths:
-- 
GitLab