-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Bug Report or Feature Request (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [x] feature request
Versions.
@angular/cli: 1.3.2
node: 7.8.0
os: darwin x64
Repro steps.
Not a failure.
The log given by the failure.
Not a failure
Desired functionality.
With modern DevOps and infrastructure automation, it is easy to create a new environment on the fly. To better support this new world, it would be preferred to have one build package and provide the configuration at the point of deployment. This is a more flexible model, which fits a more dynamic environment.
Imagine you are trying to reproduce an issue, but you need to have a copy of production to duplicate the issue, as it only shows up in production. With modern infrastructure tools, it is easy to create a replica of production in the cloud and all the other services on the Internet. With the current design the following steps are required to create a new environment:
- Build new environment services
- Create a new
evironment.{env}.ts
file from the new settings of step 1 - Create a build to incorporate the environment file from step 2
- Deploy new build to environment
In the process above, you risk creating a build that differs from the one in production, which could cause issues and loss of time. The new environment services are first, since you may get tokens and other settings from these services, which need to go into the environment file. This design requires knowledge of all your environments to be known and static, which is fine in a small project, but it is inflexible in this modern era.
By using a runtime environment settings, we reduce the need to create a new environment file and build, which may lead to issues. Here is an example flow for runtime environment settings:
- Build environment services
- Create a new environment settings file from the new settings of step 1
- Deploy a copy of production's build package along with the new environment settings file into the new environment
In this example, the new environment has an exact copy of the build package, not a new build. Runtime environment settings, allow for easy creation of new environments to meet current project needs.
Mention any other details that might be useful.
Nothing else to add.