Bring scoped environment variables to core
What does this MR do?
(EE feature originally introduced in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112/diffs)
port over occurrences
variable_environment_scope in EE:
- [?] doc/development/ee_features.md -- Do we need another example feature instead?
- [?] ee/app/models/license.rb -- not relevant for CE?
Does this MR meet the acceptance criteria?
- Changelog entry
- Documentation created/updated or follow-up review issue created
- Code review guidelines
- Merge request performance guidelines
- Style guides
- Database guides
- Separation of EE specific content
Performance and testing
- Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- Tested in all supported browsers
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
Label as security and @ mention
- The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- Security reports checked/validated by a reviewer from the AppSec team
With the following
.base: &base script: - echo production-only $PRODUCTION_ONLY_VARIABLE - echo staging-only $STAGING_ONLY_VARIABLE - echo per-environment-value $PER_ENVIRONMENT_VALUE production: <<: *base environment: name: production staging: <<: *base environment: name: staging
production, and the following environment specific variables:
PER_ENVIRONMENT_VALUEhas production-specific value
PER_ENVIRONMENT_VALUEhas staging-specific value