devops: rename env variable (#5379)

goma searches for all `GOMA_*` env variables and fails if it doesn't
understand any.

To avoid this, rename our `GOMA_LOGIN_COOKIE` env variable into a
`PLAYWRIGHT_GOMA_LOGIN_COOKIE`.
This commit is contained in:
Andrey Lushnikov 2021-02-09 08:56:29 -08:00 committed by GitHub
parent d5a51a25b0
commit 909544907c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,10 @@ if [[ $1 == "--help" ]]; then
elif [[ $1 == "login" ]]; then
python ./third_party/goma/goma_auth.py login
elif [[ $1 == "start" ]]; then
if [[ ! -z "$GOMA_LOGIN_COOKIE" ]]; then
echo "$GOMA_LOGIN_COOKIE" > "$HOME/.goma_oauth2_config"
# We have to prefix ENV with `PLAYWRIGHT` since `GOMA_` env variables
# have special treatment by goma.
if [[ ! -z "$PLAYWRIGHT_GOMA_LOGIN_COOKIE" ]]; then
echo "$PLAYWRIGHT_GOMA_LOGIN_COOKIE" > "$HOME/.goma_oauth2_config"
fi
if [[ ! -f "$HOME/.goma_oauth2_config" ]]; then
echo "ERROR: goma is not logged in!"