sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.87k stars 2.14k forks source link

Webhooks don't trigger #447

Open rkcreation opened 8 years ago

rkcreation commented 8 years ago

Hi,

If someone could help me, I certainly miss some conf...

I have a Gitlab container running (thanks !), all features working, but there is only one weird thing with webhook :

I use git bash for windows (maybe ?), and I've tested with requestb.in and my own script. Gitlab container is started with docker-compose, and Web UI is behind an apache2 proxy. I can't figure what I'm doing wrong.

Is there any specific configuration or workflow ?

Thanks in advance ! And thanks yet for the work !

PS : my docker-compose.yml (some private vars are replaced of course)

data:
  image: busybox
  volumes:
    - ---:/var/lib/postgresql
    - ---:/var/lib/redis
    - ---:/home/git/data
    - ---:/home/git/gitlab-shell/hooks
dbpg:
  image: sameersbn/postgresql:latest
  environment:
    - DB_NAME=gitlabhq_production
    - DB_USER=gitlab
    - DB_PASS=---
  volumes_from:
    - data
redis:
  image: sameersbn/redis:latest
  volumes_from:
    - data
gitlab:
  image: sameersbn/gitlab:8.0.2
  environment:
    - TZ=Europe/Paris
    - GITLAB_HOST=---
    - GITLAB_EMAIL=---
    - GITLAB_EMAIL_REPLY_TO=---
    - GITLAB_BACKUPS=daily
    - GITLAB_BACKUP_EXPIRY=1209600
    - GITLAB_PORT=10080
    - GITLAB_SSH_PORT=10022
    - GITLAB_TIMEZONE=Paris
    - GITLAB_SECRETS_DB_KEY_BASE=---
    - SMTP_ENABLED=true
    - SMTP_STARTTLS=true
    - SMTP_TLS=true
    - SMTP_AUTHENTICATION=login
    - SMTP_OPENSSL_VERIFY_MODE=none
         -- all smpt confs (SMTP_PORT....)
  links:
    - dbpg:postgresql
    - redis:redisio
  volumes_from:
    - data
  ports:
    - "10080:80"
    - "10022:22"
fzerorubigd commented 8 years ago

I have the exact same problem. I check the gitlab with this command :

docker exec -it gitlab sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

(Assume the container name is gitlab) the result is full of this error :

wrong or missing hooks                                                                      [544/1745]
  Try fixing it:
  sudo -u git -H /home/git/gitlab-shell/bin/create-hooks
  Check the hooks_path in config/gitlab.yml
  Check your gitlab-shell installation
  For more information see:
  doc/install/installation.md in section "GitLab Shell"
  Please fix the error above and rerun the checks.

So I try

docker exec -it gitlab sudo -u git -H /home/git/gitlab-shell/bin/create-hooks

And every thing is fixed.

rkcreation commented 8 years ago

Thanks ! I will test this soon, and let you know

-------- Message d'origine -------- De : fzerorubigd notifications@github.com Date :06/10/2015 12:42 (GMT+01:00) A : sameersbn/docker-gitlab docker-gitlab@noreply.github.com Cc : rkcreation nicolas@rkcreation.fr Objet : Re: [docker-gitlab] Webhooks don't trigger (#447)

I have the exact same problem. I check the gitlab with this command :

docker exec -it gitlab sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production (Assume the container name is gitlab) the result is full of this error :

wrong or missing hooks [544/1745] Try fixing it: sudo -u git -H /home/git/gitlab-shell/bin/create-hooks Check the hooks_path in config/gitlab.yml Check your gitlab-shell installation For more information see: doc/install/installation.md in section "GitLab Shell" Please fix the error above and rerun the checks. So I try

docker exec -it gitlab sudo -u git -H /home/git/gitlab-shell/bin/create-hooks And every thing is fixed.

— Reply to this email directly or view it on GitHub.

sameersbn commented 8 years ago

@fzerorubigd thanks for the info. I will try this out and eventually add it as part of the image.

fzerorubigd commented 8 years ago

@sameersbn this was because I migrate from normal installation to this. all new repo was fine, but for old repo -since the addresses are changed- I get no hook or activity update or many other thing. This is harmless to call this in the docker entry script, but I think it save a lot of time for others like me.

Thank you!

sameersbn commented 8 years ago

got it. will add it to the app:sanitize command then

elboletaire commented 8 years ago

got it. will add it to the app:sanitize command then

:+1:

rkcreation commented 8 years ago

When I gitlab:check, I have just one warning for uploads directory, but no error for hooks or something. I fix this error, and now everything else is green. Anyway, I run /home/git/gitlab-shell/bin/create-hooks but it's the same thing : when I "Test hook" in UI, my hooks works, but when I push, nothing is done. Any other idea ? I think it's my setup, but I can't figure what's wrong... Thanks

sameersbn commented 8 years ago

not sure about this. I have not used hooks myself.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.