We have moved Pocket's GA4 property under the Mozilla Account.
We use a lookup table in the GTM container to set measurement ID
based on whether the hostname is production or not.
If production, the measurement ID connects to getpocket.com - GA4
property.
If not production, the measurement ID connects to getpocket.com -
GA4 Testing property.
* Allow Pocket Mode to draw its Google Analytics code from settings, if available
...else do not boot up Google Analytics at all
* Add GA config for Pocket-mode demos
* Re-group Google Analytics-related settings
* Lay in initial Cloud Build configs for generating demo apps on Cloud Run
This is experimental for now.
There are two configs in this changeset, one for mozorg and a very similar
one for pocket. They both trigger builds of containers, uploads them to
Artifact Registry in us-central1 and deoploys them to Cloud Run in either
Mozorg mode or Pocket mode, respectively.
This is not the entire puzzle, though. We also will need to...
1) Set up corresponding Services with the expected names, which are taken
from the branch names: mozorg-demo-1, mozorg-demo-2....5, pocket-demo-1,
pocket-demo-2 (We'll just have two pocket demos for now)
2) Set up custom domains to those (now-known) services
3) Setting appropriate hostnames for ALLOWED_HOSTS, rather than the wildcard
As for setting custom env vars - that's still to be solved.
* Update ENV var handling, ahead of setting some in the Service
* Update demo config to use separate env file(s)
We can't support multiple env files, so developers can't have a core env
and then add to a 'demo.env' additional file, unfortunately.
However, they can edit/add to these new Mozorg- or Pocket-specific env files.
There may be an occaisonal merge conflict in these files, but that should
be very rare.
Secrets are kept secret and need to be provisioned separately. At the moment
we're going with a somewhat verbose and numerous set of secrets, but maybe
we can pull all this into a single YAML file of secrets, like we do with k8s.
* Rename Cloud Build config files and add cloud-only logging option
* Drop cloudbuld YAML config for GCP demos - moved to infra repo instead
* Remove redundant config from Pocket demo env vars