You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deploy plugin should take the option --dryRun.
This option will stop the removal of the .serverless directory in the package plugin and will e.g. save the CloudFormation file in the .serverless directory (in the awsDeploy plugin).
This way the user gets all the resources but won't have to deploy them to his provider.
@pmuens@flomotlik adding this is going to make testing #1777 easier as I will be able to test packaging without the deployment. Perhaps I could add support for this first?
Great that you would like to take this one @johncmckim!
What are your thoughts / plans on how to implement it? Should we add another command to the deploy plugin or use an option for deploy (like mentioned in the issue description).
IMHO it should be a separate command / plugin so that we don't spread multiple ifs which will check for the dryrun option across files.
So it could be serverless dryrun or serverless deploy dryrun which will cause the package plugin to create the deployment artifacts and the creation of the CloudFormation file which both will be saved into the .serverless directory (which won't be cleaned up).
@pmuens since this is a small change I actually started it before you replied so I could see how the deployment process works.
I implemented it as described via a flag. To do this did involve spreading multiple ifs around. The end result is also more of a package or build process rather than a dryRun deploy.
I think it makes more sense as a separate command i.e. serverless package.
I'll send a WIP PR so you can see what I've done and trial it.
Activity
johncmckim commentedon Aug 10, 2016
@pmuens @flomotlik adding this is going to make testing #1777 easier as I will be able to test packaging without the deployment. Perhaps I could add support for this first?
pmuens commentedon Aug 10, 2016
Great that you would like to take this one @johncmckim!
What are your thoughts / plans on how to implement it? Should we add another command to the
deployplugin or use an option fordeploy(like mentioned in the issue description).IMHO it should be a separate command / plugin so that we don't spread multiple
ifs which will check for thedryrunoption across files.So it could be
serverless dryrunorserverless deploy dryrunwhich will cause the package plugin to create the deployment artifacts and the creation of the CloudFormation file which both will be saved into the.serverlessdirectory (which won't be cleaned up).What are your thoughts @flomotlik @eahefnawy
johncmckim commentedon Aug 10, 2016
@pmuens since this is a small change I actually started it before you replied so I could see how the deployment process works.
I implemented it as described via a flag. To do this did involve spreading multiple
ifs around. The end result is also more of a package or build process rather than adryRundeploy.I think it makes more sense as a separate command i.e.
serverless package.I'll send a WIP PR so you can see what I've done and trial it.
pmuens commentedon Aug 10, 2016
Hey @johncmckim thank you for your reply and the work on the PR! 🎉
Will look into it ASAP!
pmuens commentedon Aug 10, 2016
@johncmckim thanks again 🎉
Just added my thoughts in the PR.
The gist of this is that we should reconsider the implementation to be a plugin we can use to produce the deployment artifacts without deploying it.