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
{{ message }}
Repository navigation
hook-deploy CLI always creates new hook instead of updating existing #14
Currently I workaround this by creating custom update utility, but it's not convenient at all. Is there plans to allow passing config params through environment variables, i.e for CD needs?
Two last commands give the same message created new service at: https://hook.io/kolya-ay/hookbroken-js. I can provide you my production.json if it's necessary.
Thanks for the additional information. I agree that the production site still needs improvement, we are actively working on it.
I'm guessing this issue may be because there isn't a package.json manifest for the service. I'm not certain we support the command syntax you are trying to use. I'll see what I can do about making sure we catch the error condition causing this confusing created message.
Can you try running hook-init in the folder for your service? From there you can define the entry point and service name. Once initialized you should be able to hook deploy
I also just noticed that the example code you posted isn't using the hook.res or res variable which is required for JavaScript services in order to end the request.
I've updated master to fix this deployment issue, as well as generally improve the hook-deploy command.
The crux of the issue was that sdk client previously was unable to smoothly deploy single files without a valid package.json file. Now it should be possible to deploy either a folder with a package.json, or a single file.
We should be pushing out a new sdk release and production update soon.
Thank you. Just hadn't found in the docs that package.json is required or either used somehow. I'm totally fine with that especially because it addresses my another question how to specify exact hook name from command line;)
I think also that package.json semantic could be extended to optionally contain some data from the hook.io-sdk/config manifest. It's just my suggestion but it seems to be the right place (user/email fields are already there). It may be related to global hook config the same way as git system/git local configurations relate to each other. This would partially solve CI deployment issue. Not sure how to deal with the private_key though.
By the way, where is the right place to ask questions or make feature requests? Is there some slack/gitter channel?
Fill free to close the issue as my particular use-case is satisfied.
Would it help at all if we exposed hook_private_key and user and other config properties as arguments to the CLI commands? Are you trying to run hook-deploy binary as part of a CD script?
It might make more sense for you to create a custom deployment script doing something like:
Activity
Marak commentedon Dec 3, 2017
That shouldn't be happening.
Are you seeing duplicate hooks with the same name? It shouldn't be possible to create multiple hooks with the same name.
Can you provide steps to reproduce?
kolya-ay commentedon Dec 3, 2017
Thank you for immediate response. hook.io looks very cool, but a bit uncrowned here and there.
Yes, just tried
Two last commands give the same message
created new service at: https://hook.io/kolya-ay/hookbroken-js. I can provide you my production.json if it's necessary.Marak commentedon Dec 3, 2017
Thanks for the additional information. I agree that the production site still needs improvement, we are actively working on it.
I'm guessing this issue may be because there isn't a
package.jsonmanifest for the service. I'm not certain we support the command syntax you are trying to use. I'll see what I can do about making sure we catch the error condition causing this confusing created message.Can you try running
hook-initin the folder for your service? From there you can define the entry point and service name. Once initialized you should be able tohook deployMarak commentedon Dec 3, 2017
I also just noticed that the example code you posted isn't using the
hook.resorresvariable which is required for JavaScript services in order to end the request.For more examples you can try deploying any of these folders: https://github.com/stackvana/microcule-examples
[bin] [ux] Better handling of pkg deployment #14
[api] [fix] Ensure error is passed to client #14
[bin] [refactor] Allow for non-pkg deployments
Marak commentedon Dec 4, 2017
Didn't mean to close the issue yet.
I've updated
masterto fix this deployment issue, as well as generally improve thehook-deploycommand.The crux of the issue was that sdk client previously was unable to smoothly deploy single files without a valid
package.jsonfile. Now it should be possible to deploy either a folder with apackage.json, or a single file.We should be pushing out a new sdk release and production update soon.
kolya-ay commentedon Dec 4, 2017
Thank you. Just hadn't found in the docs that
package.jsonis required or either used somehow. I'm totally fine with that especially because it addresses my another question how to specify exact hook name from command line;)I think also that
package.jsonsemantic could be extended to optionally contain some data from thehook.io-sdk/configmanifest. It's just my suggestion but it seems to be the right place (user/emailfields are already there). It may be related to global hook config the same way as git system/git local configurations relate to each other. This would partially solve CI deployment issue. Not sure how to deal with the private_key though.By the way, where is the right place to ask questions or make feature requests? Is there some slack/gitter channel?
Fill free to close the issue as my particular use-case is satisfied.
Marak commentedon Dec 4, 2017
@kolya-ay -
Would it help at all if we exposed
hook_private_keyanduserand other config properties as arguments to the CLI commands? Are you trying to runhook-deploybinary as part of a CD script?It might make more sense for you to create a custom deployment script doing something like:
The best place to request features is as Github Issues or the related repos or using http://hook.io/wishlist