Trigger jobs in gitlab-ci on merge request

≡放荡痞女 提交于 2019-11-30 11:16:59

This is now possible. This has been introduced in GitLab 11.6.

Well, it's not built in currently however it's not impossible to do it yourself. Gitlab allows to trigger a job. It also supports webhooks on merge requests. However webhooks don't support variable in URIs and triggers can't read request body so you'd have to create a script that will act like a middle-man here:

  1. Webhook on merge request calls to your script
  2. Script parses the request and calls a triggers in gitlab with correct REF
  3. Trigger runs the job that is marked with;

    only: -triggers

It's a bit hacky but it's working and easy to implement.

rpadovani

For the moment, no. You should subscribe the issue to see if and when they will be available (and if your company is a enterprise customer, maybe you can contact them to ask to prioritize the implementation)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!