requilence / integram

Integrate Telegram into your workflow – Trello, Gitlab, Bitbucket and other bots
https://integram.org
GNU General Public License v3.0
1.54k stars 151 forks source link

Gitlab: Pipeline events and Job events don't work #62

Closed mkurnikov closed 5 years ago

mkurnikov commented 6 years ago

Trying to test my gitlab integration from the Test dropdown in Gitlab. I am using private Dockerized version, but tested with integram.org too, same behavior.

Both Job event and Pipeline event has 200 OK response in Gitlab, but never show up in Telegram chat. Push event works fine.

For jobs there is an entry in logs:

[GIN] 2018/03/03 - 09:50:34 | 200 |   1.00251186s |      172.18.0.5 |  POST     /gitlab/34tmk546
time="2018-03-03T09:50:40Z" level=error msg="Can't use SetServiceHostFromURL with empty arg" chat=248278386 domain= file=/go/src/github.com/integram-org/gitlab/vendor/github.com/requilence/integram/context.go func="github.com/integram-org/gitlab/vendor/github.com/requilence/integram.(*Context).SetServiceBaseURL" ip="172.20.0.4:51522" line=75 service=gitlab url="POST /gitlab/34tmk546"

This could be relevant https://gitlab.com/gitlab-org/gitlab-ce/issues/15316#note_57434902

Gitlab 10.5.1 Latest Docker images of Integram

zappbrannigan34 commented 5 years ago

webhook reciever get data. Problem is bot not process it and not show message

{"object_kind":"push","event_name":"push","before":"d04e8ab7db9899c7addba02bef01280d79bd4acc","after":"79ecd298ba88546dc05aaee869ff67c32445d305","ref":"refs/heads/master","checkout_sha":"79ecd298ba88546dc05aaee869ff67c32445d305","message":null,"user_id":2,"user_name":"Кузнецов Алексей","user_username":"al.kuznetsov","user_email":"al.kuznetsov@securitycode.ru","user_avatar":"https://gitlab.mobile-test.securitycode.ru/uploads/-/system/user/avatar/2/0.jpg","project_id":37,"project":{"id":37,"name":"mdm-install","description":"","web_url":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install","avatar_url":null,"git_ssh_url":"ssh://git@gitlab.mobile-test.securitycode.ru:23/mobile/SecretMDM/mdm-install.git","git_http_url":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install.git","namespace":"SecretMDM","visibility_level":0,"path_with_namespace":"mobile/SecretMDM/mdm-install","default_branch":"master","ci_config_path":null,"homepage":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install","url":"ssh://git@gitlab.mobile-test.securitycode.ru:23/mobile/SecretMDM/mdm-install.git","ssh_url":"ssh://git@gitlab.mobile-test.securitycode.ru:23/mobile/SecretMDM/mdm-install.git","http_url":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install.git"},"commits":[{"id":"79ecd298ba88546dc05aaee869ff67c32445d305","message":"add exacutable attribute to setup.py\n","timestamp":"2018-09-13T09:30:03Z","url":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install/commit/79ecd298ba88546dc05aaee869ff67c32445d305","author":{"name":"kuznetsovalexey34@gmail.com","email":"kuznetsovalexey34gmail.com@zap.securitycode.ru"},"added":[],"modified":["setup.py"],"removed":[]},{"id":"3a0d3ce904ebd6f270d0eb8deab2f69c1defd77b","message":"Add new file","timestamp":"2018-08-16T13:33:47Z","url":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install/commit/3a0d3ce904ebd6f270d0eb8deab2f69c1defd77b","author":{"name":"Кузнецов Алексей","email":"al.kuznetsov@securitycode.ru"},"added":[".gitlab-ci.yml"],"modified":[],"removed":[]},{"id":"d04e8ab7db9899c7addba02bef01280d79bd4acc","message":"Merge branch 'task/5971_password_check_settings'\n","timestamp":"2018-07-26T13:34:54Z","url":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install/commit/d04e8ab7db9899c7addba02bef01280d79bd4acc","author":{"name":"Anton Onopko","email":"a.onopko@securitycode.ru"},"added":[],"modified":[".libinst/mdmConfig.example.xml","install_utils/user_managr.py"],"removed":[]}],"total_commits_count":3,"repository":{"name":"mdm-install","url":"ssh://git@gitlab.mobile-test.securitycode.ru:23/mobile/SecretMDM/mdm-install.git","description":"","homepage":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install","git_http_url":"https://gitlab.mobile-test.securitycode.ru/mobile/SecretMDM/mdm-install.git","git_ssh_url":"ssh://git@gitlab.mobile-test.securitycode.ru:23/mobile/SecretMDM/mdm-install.git","visibility_level":0}}

mkurnikov commented 5 years ago

Hmm, ok, got it. I don't have a setup right now, but I'll try to have it soon, will check again, and reopen, if problem still persists with new details.

Thanks.

zappbrannigan34 commented 5 years ago

Looks like not work only if test button webhook with pipeline.