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

Docker running but requests not passing #75

Open
cescamilla opened this issue Nov 9, 2019 · 4 comments
Open

Docker running but requests not passing #75

cescamilla opened this issue Nov 9, 2019 · 4 comments

Comments

@cescamilla
Copy link

Hi guys,

I'm running the tool in Docker but I don't receive the requests into Jenkins, this is my docker command
docker run -p 80:8080 stakater/gitwebhookproxy:v0.2.70 -listen :80 -upstreamURL :8080 -provider gitlab -allowedPaths /project -secret supersecret
Note that I'm using -p to map the ports, otherwise the docker ps command shows no port open for this image

then I get this output from docker:
2019/11/09 16:55:39 Stakater Git WebHook Proxy started with provider 'gitlab' 2019/11/09 16:55:39 Listening at: :80

After that I sent a [POST] to :80/project/ that I assume should be logged into the stdout but nothing occurs

If I hit directly :8080/project/ I can run the build successfully

I'm running the docker image in Ubuntu 16.04.6 LTS
already tried v0.2.63 but same behaviour is observed

so my questions are: should I expect any http request logged in stdout? should I keep using -p argument?

Thanks in advance!
Screen Shot 2019-11-09 at 11 18 41 AM

@rasheedamir
Copy link
Member

@cescamilla you still facing this issue or we can close it?

@pispico
Copy link

pispico commented Apr 14, 2020

Hey just one thing, when using docker you have to map ports, I am using docker-composer and one configuration is missing, look how is my docker composer, btw thanks for this amazing proxy.

jenkinswebhookproxy:
image: 'stakater/gitwebhookproxy:latest'
ports:
- "8080:8080"

command: ["-listen", ":8080", "-secret", "test", "-upstreamURL", "http://12.12.12.12", "-allowedPaths", "/github-webhook"]
restart: on-failure

@cescamilla
Copy link
Author

I've abandoned the project due to this issue, so I would have to check again if the issue persists

@pispico
Copy link

pispico commented Apr 14, 2020

@cescamilla in case you want to make some tests my advice would be:
-Start the GitWebProxy with docker-composer, you can use mine above, while testing I prefer run composer in foreground to check if incoming connections are working properly(Github-> GitWebHookProxy).
After add the parameter ports in docker-compose.yml, I could manage to receive webhooks calls from GitHub, one detail is to not forget the "/" in the end of URL (eg : http://YOURIPHERE:8080/github-webhook/)
I added a secret, in Github webhook configuration and use the same secret in the proxy.
After doing this I could receive webhooks from GIthub, you can see it in the log from composer

"jenkinswebhookproxy_1 | 2020/04/14 18:51:32 Redirected incomming request '/github-webhook/' to 'http://0.0.0.123/github-webhook/' with Response: '200 OK'"

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

No branches or pull requests

3 participants