Git Product home page Git Product logo

Comments (8)

johnmcollier avatar johnmcollier commented on July 16, 2024 1

@maysunfaisal Both

from api.

l0rd avatar l0rd commented on July 16, 2024

cc @johnmcollier @elsony

from api.

davidfestal avatar davidfestal commented on July 16, 2024

That would be very easy to do, model-wise, and quite consistent with the way environment is mentioned in other parts of the devfile (in container components for example).

from api.

l0rd avatar l0rd commented on July 16, 2024

Reviewed and approved

from api.

maysunfaisal avatar maysunfaisal commented on July 16, 2024

I am wondering what is the benefit of doing this way as opposed to having the ENV defined for the component container?

Also what happens if multiple commands are referencing the same component and require the same ENV? Will I need to mention it twice in the respective command? That seems redundant IMO..

from api.

johnmcollier avatar johnmcollier commented on July 16, 2024

@maysunfaisal This allows you to easily set variables for just one command, without needing to change the default value for the entire container, and to allow separate commands to have separate values for the same variable.

The environment variable value will only be set in the context of the command, and shouldn't conflict with other commands setting the same variable.

The example given in issue description is a good one, setting different values of JAVA_OPTS for each separate command as needed.

from api.

maysunfaisal avatar maysunfaisal commented on July 16, 2024

@johnmcollier will 2.0 spec support defining ENV on the component level as well or just on the command level?

from api.

davidfestal avatar davidfestal commented on July 16, 2024

Implemented

from api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.