faas-cli icon indicating copy to clipboard operation
faas-cli copied to clipboard

Feature: "watch" mode -> automatic build/push/deploy on save

Open alexellis opened this issue 7 years ago • 7 comments

Expected Behaviour

New feature: file-system watch mode will detect a change in a function handler folder and then automatically build/push/deploy the affected function.

This would be done via the existing OpenFaaS API meaning all backends are supported - faas-fargate, faas-swarm, faas-netes and openfaas-operator.

Similar things are done in entire projects such as skaffold from Google. I know Stefan @stefanprodan is a fan of this project. I believe Skaffold needs a Dockerfile in a set place, we can workaround this by using "faas-cli build --shrinkwrap" or maybe a combination of all of the above.

The basic idea is to allow a "watch" / auto-reloader experience for function development.

Thoughts?

alexellis avatar Jul 24 '18 20:07 alexellis

I was chatting to @johnmccabe about this, we're thinking of adding faas-cli up with an optional --watch flag which would be an alias for the whole workflow of build/push/deploy

alexellis avatar Aug 16 '18 07:08 alexellis

@johnmccabe how did the initial attempt go with this? How does Docker-Compose handle de-bounce?

alexellis avatar Aug 30 '18 10:08 alexellis

Initial PoC worked well, I'll pick this up after work tomorrow and get something pushed up for eyeballs.

johnmccabe avatar Aug 30 '18 14:08 johnmccabe

Awesome John.

alexellis avatar Sep 01 '18 17:09 alexellis

@johnmccabe do you still have work in progress for this?

alexellis avatar Oct 02 '18 08:10 alexellis

Yeah, needs dusted off and pushed (got side-tracked helping with the minikube stuff) - I can swing back round to this on Sunday after I get VMUG and PHP Scotland out of the way.

johnmccabe avatar Oct 02 '18 20:10 johnmccabe

Do you still have a local copy? Anything we should be aware of or watch for?

alexellis avatar Jan 10 '19 12:01 alexellis