Skip to content

Detect GOOGLE_SEARCH_KEY environment variable

What does this MR do and why?

Follow up to: !3866 (merged).

Provides information to for make compile so people know if they're building with Google Programmable Search whether the search has a chance of working or not. It can't do any validation, but can at least check if GOOGLE_SEARCH_KEY is set.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Check out this branch.
  3. Run make compile with GOOGLE_SEARCH_KEY. Notice the presence of the environment is detected.
  4. Run unset GOOGLE_SEARCH_KEY. Then run make compile. Notice the lack of the environment variable is detected.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports