Run webhooks instead of shell commands (possibly without a runner)
Currently I have a project on Gitlab which uses webhook to trigger a deploy script. It works nice, but it is not very comfortable when something goes wrong. No logs, no e-mails. But Gitlab CI provides all this nice stuff. So I would like to run this webhook from Gitlab CI instead.
Obviously, I could configure CI to run wget on given URL, but I want to make it secure, without providing shell access to anyone, who can tweak the .gitlab-ci.yml file. And using Docker looks like overkill to run one wget command.
I see two ways how to implement this:
- Create specialized runner which will trigger a webhook instead of running shell commands. There will be no security concerns about runner's permissions.
- Do not use runners at all and let CI to trigger webhook itself instead of kicking the runner.
And finally, Gitlab's webhooks should be integrated with Gitlab CI, so they are runned via CI automatically without actually configuring anything else, except enabling the project in Gitlab CI.