Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

--package option does not work for individualy packaged deployments #190

Closed
ddoowa opened this issue Oct 22, 2019 · 3 comments
Closed

--package option does not work for individualy packaged deployments #190

ddoowa opened this issue Oct 22, 2019 · 3 comments

Comments

@ddoowa
Copy link
Contributor

ddoowa commented Oct 22, 2019

I have my build to package individually and built using webpack. when doing a serverless deploy everything works fine, as it picks up the artifact needed to deploy via setting that's injected during the package phase, how ever. when running
serverless deploy -p .serverless/
or
`serverless deploy --package .serverless/'
i get an error.

however doing
serverless deploy -p .serverless/func1.zip
happly deploys func1 to ALL the functions, so func2 and 3 have func1 as there base encoded zip.

it seems that the --p and --package only support a single zip package deployment and does not cater for individually packaged deployments, as inspected in the deployFunction logic below

kubelessConfig.init().then(() => {
        _.each(this.serverless.service.functions, (description, name) => {
          
          const pkg = this.options.package ||
            this.serverless.service.package.path ||
            this.serverless.service.package.artifact ||
            description.package.artifact ||
            this.serverless.config.serverless.service.artifact;
@andresmgot
Copy link
Contributor

That's correct, right now that's not supported. At the moment, we don't have the bandwidth to work on this but we welcome any PR or contribution possible! Let me know if you can give this a try, I can help you with any issue you find.

@ddoowa
Copy link
Contributor Author

ddoowa commented Oct 23, 2019

Thanks @andresmgot , just working on it now, will raise a PR very soon, is there any prerequisites i should know about

@andresmgot
Copy link
Contributor

not really, the CI will pick up your changes and test them. We can take it from there.

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

No branches or pull requests

2 participants