Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Amirault <mamirault@gitlab.com>2022-10-20 16:43:38 +0300
committerMarcel Amirault <mamirault@gitlab.com>2022-10-20 16:43:38 +0300
commitacec4746108c1d341337971c4e83502350e15530 (patch)
tree737db9006be57e96c88c82db300fbc22acd29656 /scripts
parent80c44fe14c8fad4f74af835e8043bc2f7a54f369 (diff)
Add REVIEW_SLUG to environment for review apps scripts
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deploy-review-app2
-rwxr-xr-xscripts/review-replace-urls2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/deploy-review-app b/scripts/deploy-review-app
index c6c09c85..f657e697 100755
--- a/scripts/deploy-review-app
+++ b/scripts/deploy-review-app
@@ -51,7 +51,7 @@ gcp_bucket=$GCP_BUCKET_REVIEW_APPS
gcp_service_account_key=$GCP_SERVICE_ACCOUNT_KEY_REVIEW_APPS
cache_control_max_age='60'
src='public/'
-dest="gs://$gcp_bucket/$CI_COMMIT_REF_SLUG"
+dest="gs://$gcp_bucket/$CI_COMMIT_REF_SLUG$REVIEW_SLUG"
echo "$gcp_service_account_key" > key.json
gcloud auth activate-service-account --key-file key.json
diff --git a/scripts/review-replace-urls b/scripts/review-replace-urls
index f78e8324..108b763a 100755
--- a/scripts/review-replace-urls
+++ b/scripts/review-replace-urls
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
# Note this uses linux-specific (GNU) find syntax, it does not work with MacOS (BSD) find syntax because of the usage of the 'regextype' flag (and possibly other reasons)
-find public/ -type f -regextype egrep -iregex ".*\.(html|js|css|json|xml|txt)" -exec sed --in-place "s#https\?://docs.gitlab.com#https://$CI_COMMIT_REF_SLUG.docs.gitlab-review.app#g" "{}" +;
+find public/ -type f -regextype egrep -iregex ".*\.(html|js|css|json|xml|txt)" -exec sed --in-place "s#https\?://docs.gitlab.com#https://$CI_COMMIT_REF_SLUG$REVIEW_SLUG.docs.gitlab-review.app#g" "{}" +;