Verified Commit 5f597fde authored by Vincent's avatar Vincent

Identify the proper app URL for the extension

Since the build jobs are no longer running in a regular pipeline,
the provision job no longer runs before to provide the app URL to
the extension build. Thus, we'll have to reconstruct it ourselves.

(This does result in one more place to keep up-to-date if the URL
structure ever changes, but since it explicitly lists `plaudit.pub`
it will probably be detected if the production domain ever changes,
and it's not as critical for review apps if _their_ URL structure
changes, and easy to fix once detected.)
parent 424c7424
......@@ -194,7 +194,12 @@ build_extension:
except:
- schedules
script:
- export APP_URL=`cat environment_url.txt`
# Use the branch/tag name as the variable part of a review app,
# limited to 26 chars (30 is the max length of Heroku app names, which we prepend with `p5t-`),
# and with a potential trailing dash stripped
- export WORKSPACE_NAME=`echo $CI_COMMIT_REF_SLUG | cut -c 1-26 | sed -e 's/-$//'`
- if [[ $CI_COMMIT_REF_NAME == "master" ]]; then export SUBDOMAIN="www"; else export SUBDOMAIN="$WORKSPACE_NAME-review"; fi;
- export APP_URL="https://$SUBDOMAIN.plaudit.pub"
- cd extension
- yarn
- if [[ $CI_COMMIT_REF_NAME != "master" ]]; then node tag_prerelease_version.js; fi;
......
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