serverless-finch icon indicating copy to clipboard operation
serverless-finch copied to clipboard

Selective deploy

Open Akababa opened this issue 8 years ago • 5 comments

Allow a command line option to specify which files to deploy, or even better take it as standard input so it can be piped with git diff.

Akababa avatar Oct 13 '17 18:10 Akababa

@Akababa Sounds like a great option. I'm happy to help review PRs that include that functionality if you have time to work on it. Let me know if you need help getting started.

I don't know if I'll be able to prioritize this myself right now but I will mark it as a help wanted enhancement. Thanks for the idea!

fernando-mc avatar Oct 13 '17 18:10 fernando-mc

Sure, I'll give it a shot. I'm still new to this so could you tell me what the best practice is for taking multiple file names in a command line option, or how to read from stdin in this framework?

Akababa avatar Oct 13 '17 23:10 Akababa

@Akababa I'd suggest reviewing some of these resources first: https://serverless.com/blog/writing-serverless-plugins/ https://serverless.com/framework/docs/providers/aws/guide/plugins/

I'm not sure how much use I'll actually be guiding development here, but I'll see if I can find some examples and let you know if I find similar cases.

fernando-mc avatar Oct 14 '17 05:10 fernando-mc

@Akababa I think we'd love to have this feature still. One of the other maintainers has done a lot of refactoring so changes and new features should be easier to make after I merge this new version today. I'm assigning this to you for now but feel free to reach out for help!

fernando-mc avatar Apr 22 '18 20:04 fernando-mc

@Akababa

I'm doing selective deploy like this if it helps.

client:
   bucketName: ${opt:client}-${opt:stage, 'dev'}.domain.tld
   distributionFolder: client/${opt:client}/dist
   indexDocument: index.html
   errorDocument: error.html

my file structure is

./serverless.yml
./client/client1/dist/
./client/client2/dist/
./client/client3/dist/

then to deploy via cli

sls client deploy --stage dev --client client1
sls client deploy --stage dev --client client2
sls client deploy --stage dev --client client3

junjettrasmonte avatar Aug 28 '20 08:08 junjettrasmonte