Ensure that absolute links in review apps are set correctly

parent 7771b474
Pipeline #36423988 passed with stages
in 67 minutes and 56 seconds
......@@ -194,11 +194,15 @@ review:
variables:
GIT_STRATEGY: none
script:
# We sometimes have absolute URLs, this replaces them with correct ones for the review app
- >
find public/ -regextype egrep -iregex ".*\.(html|js|css|json|xml|txt)" -exec \
sed --in-place "s#https\?://about.gitlab.com#https://$CI_COMMIT_REF_SLUG.about.gitlab.com#g" "{}" +;
- rsync --ignore-times --checksum --delete -avz public ~/pages/$CI_COMMIT_REF_SLUG
- rm -rf ./public/
environment:
name: review/$CI_COMMIT_REF_SLUG
url: http://$CI_COMMIT_REF_SLUG.about.gitlab.com
url: https://$CI_COMMIT_REF_SLUG.about.gitlab.com
on_stop: review_stop
only:
- branches@gitlab-com/www-gitlab-com
......@@ -264,7 +268,7 @@ dast:
services: []
variables:
DOCKER_DRIVER: overlay2
DAST_WEB_SITE: http://$CI_COMMIT_REF_SLUG.about.gitlab.com
DAST_WEB_SITE: https://$CI_COMMIT_REF_SLUG.about.gitlab.com
script:
- if [ -z $DAST_WEB_SITE ]; then echo "Please configure DAST_WEB_SITE env variable" && exit 1; fi
- mkdir /zap/wrk/
......
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