Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add environment options (DTAP) #552

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: add environment options (DTAP) #552

wants to merge 1 commit into from

Conversation

fabiomartino
Copy link
Contributor

Added ability to generate common environments architecture for deploy.

D development : environment.ts (already by default)
T testing: environment.testing.ts (script generated)
A acceptance: environment.acceptance.ts (script generated)
P production: environment.prod.ts (already by default)

We can choose via script prompt if add or not those environments (default to ### NO)
image

Cordially
Fabio

@fabiomartino fabiomartino changed the title feat: add enviroment options (DTAP) feat: add environment options (DTAP) Apr 17, 2020
@sinedied
Copy link
Member

sinedied commented Apr 23, 2020

Thanks @fabiomartino for this proposition!

Though I'm not sure this is something we want to push in the main generator, as this is something that gets very different depending of the team/project from my own experience. Sometimes you only want an additional staging environment, sometimes the environment have different names, sometines DTAP is completely disregarded as an outdated approach.

That said, I'm not necessarily against merging this, but I would love to hear what other folks thinks about this? @creal73 @captaincaius @bursauxa any opinions?

Also if we're going to merge this, I think we should later group this question with other "architecture" related questions like lazy-loading & PWA to reduce the total number of prompts.

@creal73
Copy link
Collaborator

creal73 commented Apr 26, 2020

I do agree with you @sinedied.

What about creating it as an addon instead ?

@isaax2
Copy link
Contributor

isaax2 commented Jun 5, 2020

I had already to do that in another project, because when you work, for example with firebase/ firebase-functions, you need at least 3 environments.

environment.ts -> local firebase emulator (development)
environment.qa.ts -> firebase config to test the entire app in the cloud.(QA)
environment.prod.ts -> firebase config production. (Prod)

image

local
image

QA
image

Prod
image

@ToFab
Copy link

ToFab commented Jul 29, 2020

This would solve a major pain point for us as our release cycle has the DTAP setup. Currently, our build script modifies the environment.ts file before deployment to each environment. This would remove the need for that work around.

@sinedied
Copy link
Member

@ToFab you can always add as many environments as you need in a project, there's no need for such a script: https://angular.io/guide/build#configuring-application-environments

To be clear, this PR would do this by default for new project, but you always had the option to add more environments after the project is generated.

@sinedied sinedied changed the base branch from master to main January 14, 2021 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants