scaleway-cli
scaleway-cli copied to clipboard
Serverless : deploy in one command
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
After intensive work with serverless function and containers through Scaleway CLI, it's hard to use because of thoses numrous steps to reach a deployed function :
- CLI: Create namespace
- CLI: Create function
- Calculate the length of my zip file
- CLI: ask for S3 upload URL with content length
- Use a S3 client to push my code to the S3
- CLI: call deploy funtion
I think it can be simplified to this :
- CLI: create namespace
- CLI: create function, upload code and deploy it with only one command
How I imagine scw could expose this functionality
Example of single command to deploy function in a namespace :
scw function deploy
--namespace <Namespace_UUID>
--zipfile <path_to_your_zip_containing_your_code
--runtime <your_runtime>
<function_name>
The API logic is not concerned here but I think that the CLI can handle a special case for deploy function that can implement underlying necessary steps to deploy a function.