Skip to content

feat: allow different values depending on environment for Segment config #8769

@NicolasMassart

Description

@NicolasMassart

Initial situation

Current MetaMetrics configuration is based on env vars in .js.env:

  • SEGMENT_WRITE_KEY
  • SEGMENT_PROXY_URL
  • SEGMENT_DELETE_API_SOURCE_ID
  • SEGMENT_REGULATIONS_ENDPOINT

But they have to be different for dev/QA/prod

Ideas

  • see how we can have these defined depending on the pipeline in bitrise.yml
  • if not possible with bitrise (but that would be the best), see how we can map in build.sh script with remapEnvVariable

Constraints

  • These values should not be neither hardcoded or put in an env file that will be commited.
  • They should be in Bitrise secrets
  • Bitrise do not allow multiple environmen t in the env/secret setting, so they must have a distinct name for each environment on bitrise. Example SEGMENT_WRITE_KEY_QA and SEGMENT_WRITE_KEY_PROD. Then they are mapped to SEGMENT_WRITE_KEY using one of the above ideas.
  • Devs should be able to simply set dev value locally in their .js.env file using the non environment dependent var names.

Metadata

Metadata

Labels

INVALID-ISSUE-TEMPLATEIssue's body doesn't match any issue template.release-7.18.0Issue or pull request that will be included in release 7.18.0release-7.19.0Issue or pull request that will be included in release 7.19.0team-mobile-platformMobile Platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions