Skip to content

Support for environment variables #935

@tobiasqueck

Description

@tobiasqueck

Is your feature request related to a problem? Please describe.

I would like to have an out of the box supported standard approach to use environment variables to configure my middlewares and tasks.

Why? As one of the maintainers of the middleware in the open-ux-tools, I have noticed a repetitive pattern: usage of environment variables. In nearly all our middlewares/tasks we support some kind of usage of environment variables as input. A quick search through other middlewares also shows that we are not the only ones but many others also have their way of allowing to provide parts of the configuration as env variables.
The problem is that everybody does their own thing leading to inconsistencies of how to use env variables.

Describe the solution you'd like

I'd prefer a very simple solution allowing me to define environment variable placeholders in my yaml e.g.

server:
  customMiddleware:
  - name: preview-middleware
    afterMiddleware: compression
    configuration:
      debug: ${DEBUG}

The UI5 CLI should resolve the environment variable before calling my middleware so that the middleware implementation does not have to bother.
Please also support dotenv out of the box as part of the same feature.

Describe alternatives you've considered

No.

Additional context

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions