# Replace environment values in Studio UI app from Trinity pipeline

**URL:** https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435
**Category:** Support Request
**Tags:** neutrinos-trinity
**Created:** [February 19, 2025, 2:46am UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435 "2025-02-19T02:46:42Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![shiv](https://community.neutrinos.com/user_avatar/community.neutrinos.com/shiv/32/31_2.png) [@shiv](https://community.neutrinos.com/u/shiv)
#### Post date: [February 19, 2025, 2:46am UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435/1 "2025-02-19T02:46:42Z")

</div>

Hi team,

The Studio UI build pipeline doesn’t have a parameter for receiving the environment file from Trinity. If it did, I wouldn’t know how to send it from Trinity when triggering the pipeline.

Once the environment file is received from Trinity in the pipeline, I will be able to replace the environment.ts file after the branch is checked out.

Please advise on the best way to achieve this.

---

<div class="post-metadata">

### Author: ![Eldho](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/e/c6cbf5/32.png) [@Eldho](https://community.neutrinos.com/u/Eldho)
#### Post date: [February 19, 2025, 2:48am UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435/2 "2025-02-19T02:48:03Z")

</div>

@Sarath @Muhseena_T please help

---

<div class="post-metadata">

### Author: ![Muhseena\_T](https://community.neutrinos.com/user_avatar/community.neutrinos.com/muhseena_t/32/90_2.png) [@Muhseena\_T](https://community.neutrinos.com/u/Muhseena_T)
#### Post date: [February 19, 2025, 5:30am UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435/3 "2025-02-19T05:30:00Z")

</div>

> [@shiv](#):
>
> Hi team,
> 
> The Studio UI build pipeline doesn’t have a parameter for receiving the environment file from Trinity. If it did, I wouldn’t know how to send it from Trinity when triggering the pipeline.
> 
> Once the environment file is received from Trinity in the pipeline, I will be able to replace the environment.ts file after the branch is checked out.
> 
> Please advise on the best way to achieve this.

@shiv Can you provide more details on the context?

---

<div class="post-metadata">

### Author: ![shiv](https://community.neutrinos.com/user_avatar/community.neutrinos.com/shiv/32/31_2.png) [@shiv](https://community.neutrinos.com/u/shiv)
#### Post date: [March 2, 2025, 4:58pm UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435/4 "2025-03-02T16:58:59Z")

</div>

We tend to rely on Angular’s built-in file replacement mechanism to inject environment-specific variables at build time. This means that it takes the environment.prod.ts file or environment.ts available in the codebase based on the configuration specified and compiles the application along with the environment variables into static files when the build pipeline from Trinity is triggered.

If while building UI applications, Trinity application can accept the environment file from the user, it would allow sending the environment file to the build pipeline where I could use Angular’s built-in file replacement to update the environment file and build with the intended environment configuration.

---

<div class="post-metadata">

### Author: ![Sarath](https://community.neutrinos.com/user_avatar/community.neutrinos.com/sarath/32/112_2.png) [@Sarath](https://community.neutrinos.com/u/Sarath)
#### Post date: [March 4, 2025, 5:40am UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435/5 "2025-03-04T05:40:44Z")

</div>

> [@shiv](#):
>
> If while building UI applications, Trinity application can accept the environment file from the user, it would allow sending the environment file to the build pipeline where I could use Angular’s built-in file replacement to update the environment file and build with the intended environment configuration.

@shiv If you include the file during build time, you’ll need to create separate builds for each environment. With Trinity’s solution, you can eliminate this hassle—build once and deploy seamlessly across multiple environments.

The feature you’re requesting goes against the core principle of deploying the same build across multiple environments. As a result, we have no plans to implement it.

If you need any further clarification, feel free to reach out.

---

<div class="post-metadata">

### Author: ![shiv](https://community.neutrinos.com/user_avatar/community.neutrinos.com/shiv/32/31_2.png) [@shiv](https://community.neutrinos.com/u/shiv)
#### Post date: [March 4, 2025, 7:36pm UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435/6 "2025-03-04T19:36:06Z")

</div>

How would I set the SSD URL for UI apps based on the different environments that the same build gets deployed to? Making edits on Trinity’s Studio Environment variables has no effect, as much as I know, this has been an issue for UI apps deployed from Trinity.

---

<div class="post-metadata">

### Author: ![Sarath](https://community.neutrinos.com/user_avatar/community.neutrinos.com/sarath/32/112_2.png) [@Sarath](https://community.neutrinos.com/u/Sarath)
#### Post date: [March 5, 2025, 12:15pm UTC](https://community.neutrinos.com/t/replace-environment-values-in-studio-ui-app-from-trinity-pipeline/435/7 "2025-03-05T12:15:39Z")

</div>

During the deployment of the UI applications, you will have the option to update the environment values. These values will be used during the application’s runtime.
