openfaas / faas-cli

Official CLI for OpenFaaS
https://www.openfaas.com/
Other
794 stars 226 forks source link

Allow configuring "build" folder. #814

Closed doowb closed 3 years ago

doowb commented 4 years ago

Expected Behaviour

I would like to be able to configure the root folder that is used for "building" the functions.

Current Behaviour

Currently, ./build is hard coded as the root folder used during the build as the Docker build context.

Possible Solution

Allow configuring this folder, leaving the default as build for backward compatibility. I suggest this follows the same rules as copyExtraPaths to allow specifying in the stack.yml or as a command line flag.

Context

I use the ./build folder differently than the faas-cli and I would like to be able to configure faas-cli so I don't impact conventions I already use.

alexellis commented 3 years ago

@doowb what problem does this solve? I am probably not reading this carefully enough, but can't see any technical or functional reason why this would be needed?

Feel free to add detail in your request.

doowb commented 3 years ago

I have a convention of putting build related code in a ./build folder. If I want to introduce OpenFaaS in the same project, the faas-cli is doing 2 things that conflict with my convention:

I have seen other tools make use of the ./build folder for generating distributable assets, but I have been able to configure that destination to match my own conventions.

alexellis commented 3 years ago

Ok, thanks for the context. I'm going to close the issue so that we can gauge interest from other users. Happy to revisit at a future date.