Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selective deploy #7

Open
Akababa opened this issue Oct 13, 2017 · 5 comments
Open

Selective deploy #7

Akababa opened this issue Oct 13, 2017 · 5 comments

Comments

@Akababa
Copy link

Akababa commented Oct 13, 2017

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.

@fernando-mc
Copy link
Owner

@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!

@Akababa
Copy link
Author

Akababa commented Oct 13, 2017

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?

@fernando-mc
Copy link
Owner

@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
Copy link
Owner

@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!

@junjettrasmonte
Copy link

junjettrasmonte commented Aug 28, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants