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

error occurred: fork/exec ./redeploy.sh #178

Closed
eoekun opened this issue Sep 23, 2017 · 1 comment
Closed

error occurred: fork/exec ./redeploy.sh #178

eoekun opened this issue Sep 23, 2017 · 1 comment
Labels

Comments

@eoekun
Copy link

eoekun commented Sep 23, 2017

Hi,
when I use webhook version 2.6.5, I got error:error occurred: fork/exec ./redeploy.sh: not a directory.
full environment info:

$ cat hooks.json 
[
  {
    "id": "redeploy-webhook",
    "execute-command": "./redeploy.sh",
    "command-working-directory": "./webhook"
  }
]
$ cat redeploy.sh 
#!/bin/sh
echo 'success'
$ ll redeploy.sh 
-rwxr-xr-x 1 root root 25 Sep 23 15:10 redeploy.sh

then start webhook use ./webhook -hooks hooks.json -verbose,and request by curl http://0.0.0.0:9000/hooks/redeploy-webhook.
full consoles:

[webhook-linux-amd64]$ ./webhook -hooks hooks.json -verbose
[webhook] 2017/09/23 15:18:34 version 2.6.5 starting
[webhook] 2017/09/23 15:18:34 setting up os signal watcher
[webhook] 2017/09/23 15:18:34 attempting to load hooks from hooks.json
[webhook] 2017/09/23 15:18:34 found 1 hook(s) in file
[webhook] 2017/09/23 15:18:34   loaded: redeploy-webhook
[webhook] 2017/09/23 15:18:34 serving hooks on http://0.0.0.0:9000/hooks/{id}
[webhook] 2017/09/23 15:18:34 os signal watcher ready
[webhook] 2017/09/23 15:18:38 incoming HTTP request from 127.0.0.1:42324
[webhook] 2017/09/23 15:18:38 redeploy-webhook got matched
[webhook] 2017/09/23 15:18:38 redeploy-webhook hook triggered successfully
[webhook] 2017/09/23 15:18:38 200 | 113.147µs | 0.0.0.0:9000 | GET /hooks/redeploy-webhook 
[webhook] 2017/09/23 15:18:38 executing ./redeploy.sh (./redeploy.sh) with arguments ["./redeploy.sh"] and environment [] using ./webhook as cwd
[webhook] 2017/09/23 15:18:38 command output: 
[webhook] 2017/09/23 15:18:38 error occurred: fork/exec ./redeploy.sh: not a directory
[webhook] 2017/09/23 15:18:38 finished handling redeploy-webhook
^C

How can I solve this problem?

@eoekun
Copy link
Author

eoekun commented Sep 23, 2017

I change hooks.json like this:

$ cat hooks.json 
[
  {
    "id": "redeploy-webhook",
    "execute-command": "./redeploy.sh",
    "command-working-directory": "./"
  }
]

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

No branches or pull requests

2 participants