Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
65855491
Commit
65855491
authored
May 11, 2021
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'latest' BrowserPerformanceTesting template for breaking changes
parent
faee533c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.latest.gitlab-ci.yml
...tes/Jobs/Browser-Performance-Testing.latest.gitlab-ci.yml
+77
-0
No files found.
lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.latest.gitlab-ci.yml
0 → 100644
View file @
65855491
# Read more about the feature here: https://docs.gitlab.com/ee/user/project/merge_requests/browser_performance_testing.html
browser_performance
:
stage
:
performance
image
:
docker:19.03.12
allow_failure
:
true
variables
:
DOCKER_TLS_CERTDIR
:
"
"
SITESPEED_IMAGE
:
sitespeedio/sitespeed.io
SITESPEED_VERSION
:
14.1.0
SITESPEED_OPTIONS
:
'
'
services
:
-
docker:19.03.12-dind
script
:
-
|
if ! docker info &>/dev/null; then
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
export DOCKER_HOST='tcp://localhost:2375'
fi
fi
-
export CI_ENVIRONMENT_URL=$(cat environment_url.txt)
-
mkdir gitlab-exporter
# Busybox wget does not support proxied HTTPS, get the real thing.
# See https://gitlab.com/gitlab-org/gitlab/-/issues/287611.
-
(env | grep -i _proxy= 2>&1 >/dev/null) && apk --no-cache add wget
-
wget -O gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/1.1.0/index.js
-
mkdir sitespeed-results
-
|
function propagate_env_vars() {
CURRENT_ENV=$(printenv)
for VAR_NAME; do
echo $CURRENT_ENV | grep "${VAR_NAME}=" > /dev/null && echo "--env $VAR_NAME "
done
}
-
|
if [ -f .gitlab-urls.txt ]
then
sed -i -e 's@^@'"$CI_ENVIRONMENT_URL"'@' .gitlab-urls.txt
docker run \
$(propagate_env_vars \
auto_proxy \
https_proxy \
http_proxy \
no_proxy \
AUTO_PROXY \
HTTPS_PROXY \
HTTP_PROXY \
NO_PROXY \
) \
--shm-size=1g --rm -v "$(pwd)":/sitespeed.io $SITESPEED_IMAGE:$SITESPEED_VERSION --plugins.add ./gitlab-exporter --cpu --outputFolder sitespeed-results .gitlab-urls.txt $SITESPEED_OPTIONS
else
docker run \
$(propagate_env_vars \
auto_proxy \
https_proxy \
http_proxy \
no_proxy \
AUTO_PROXY \
HTTPS_PROXY \
HTTP_PROXY \
NO_PROXY \
) \
--shm-size=1g --rm -v "$(pwd)":/sitespeed.io $SITESPEED_IMAGE:$SITESPEED_VERSION --plugins.add ./gitlab-exporter --cpu --outputFolder sitespeed-results "$CI_ENVIRONMENT_URL" $SITESPEED_OPTIONS
fi
-
mv sitespeed-results/data/performance.json browser-performance.json
artifacts
:
paths
:
-
sitespeed-results/
reports
:
browser_performance
:
browser-performance.json
rules
:
-
if
:
'
$CI_KUBERNETES_ACTIVE
==
null
||
$CI_KUBERNETES_ACTIVE
==
""'
when
:
never
-
if
:
'
$PERFORMANCE_DISABLED'
when
:
never
-
if
:
'
$CI_COMMIT_TAG
||
$CI_COMMIT_BRANCH'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment