Commit 9d7e0e49 authored by Joshua Lambert's avatar Joshua Lambert

Update AutoDevOps template with browser performance fix

parent aafe5c5c
...@@ -90,10 +90,14 @@ codequality: ...@@ -90,10 +90,14 @@ codequality:
performance: performance:
stage: performance stage: performance
image: image: docker:latest
name: sitespeedio/sitespeed.io:6.0.3 variables:
entrypoint: [""] DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:dind
script: script:
- setup_docker
- performance - performance
artifacts: artifacts:
paths: paths:
...@@ -112,7 +116,7 @@ sast: ...@@ -112,7 +116,7 @@ sast:
- sast . - sast .
artifacts: artifacts:
paths: [gl-sast-report.json] paths: [gl-sast-report.json]
sast:container: sast:container:
image: docker:latest image: docker:latest
variables: variables:
...@@ -260,7 +264,7 @@ production: ...@@ -260,7 +264,7 @@ production:
export CI_APPLICATION_TAG=$CI_COMMIT_SHA export CI_APPLICATION_TAG=$CI_COMMIT_SHA
export CI_CONTAINER_NAME=ci_job_build_${CI_JOB_ID} export CI_CONTAINER_NAME=ci_job_build_${CI_JOB_ID}
export TILLER_NAMESPACE=$KUBE_NAMESPACE export TILLER_NAMESPACE=$KUBE_NAMESPACE
function sast_container() { function sast_container() {
docker run -d --name db arminc/clair-db:latest docker run -d --name db arminc/clair-db:latest
docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.0.1 docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.0.1
...@@ -466,26 +470,26 @@ production: ...@@ -466,26 +470,26 @@ production:
--docker-email="$GITLAB_USER_EMAIL" \ --docker-email="$GITLAB_USER_EMAIL" \
-o yaml --dry-run | kubectl replace -n "$KUBE_NAMESPACE" --force -f - -o yaml --dry-run | kubectl replace -n "$KUBE_NAMESPACE" --force -f -
} }
function performance() { function performance() {
export CI_ENVIRONMENT_URL=$(cat environment_url.txt) export CI_ENVIRONMENT_URL=$(cat environment_url.txt)
mkdir gitlab-exporter mkdir gitlab-exporter
wget -O gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/10-3/index.js wget -O gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/10-3/index.js
mkdir sitespeed-results mkdir sitespeed-results
if [ -f .gitlab-urls.txt ] if [ -f .gitlab-urls.txt ]
then then
sed -i -e 's@^@'"$CI_ENVIRONMENT_URL"'@' .gitlab-urls.txt sed -i -e 's@^@'"$CI_ENVIRONMENT_URL"'@' .gitlab-urls.txt
/start.sh --plugins.add gitlab-exporter --outputFolder sitespeed-results .gitlab-urls.txt docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.0.3 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results .gitlab-urls.txt
else else
/start.sh --plugins.add gitlab-exporter --outputFolder sitespeed-results $CI_ENVIRONMENT_URL docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.0.3 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "$CI_ENVIRONMENT_URL"
fi fi
mv sitespeed-results/data/performance.json performance.json mv sitespeed-results/data/performance.json performance.json
} }
function persist_environment_url() { function persist_environment_url() {
echo $CI_ENVIRONMENT_URL > environment_url.txt echo $CI_ENVIRONMENT_URL > environment_url.txt
} }
......
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