diff options
author | Dmitry Poray <dmip@interprogma.ru> | 2016-11-07 20:11:54 +0300 |
---|---|---|
committer | Dmitry Poray <dmip@interprogma.ru> | 2016-11-15 17:19:33 +0300 |
commit | ff8194e0ec16092419862011d7cc048baa149c42 (patch) | |
tree | eaaf61f02c9c2d59719a3a941463a9ed2a0565f3 /app/views/projects/triggers | |
parent | c5e147de1288130147ec0f500bea50353d441cb8 (diff) | |
download | gitlab-ce-ff8194e0ec16092419862011d7cc048baa149c42.tar.gz |
Add ref parameter for triggerring builds with gitlab webhook from other project.
Diffstat (limited to 'app/views/projects/triggers')
-rw-r--r-- | app/views/projects/triggers/index.html.haml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/app/views/projects/triggers/index.html.haml b/app/views/projects/triggers/index.html.haml index f6e0b0a7c8a..6e5dd1b196d 100644 --- a/app/views/projects/triggers/index.html.haml +++ b/app/views/projects/triggers/index.html.haml @@ -76,6 +76,16 @@ script: - "curl -X POST -F token=TOKEN -F ref=REF_NAME #{builds_trigger_url(@project.id)}" %h5.prepend-top-default + Use webhook + + %p.light + Add the following webhook to another project for Push and Tag push events. + The project will be rebuilt at the corresponding event. + + %pre + :plain + #{builds_trigger_url(@project.id, ref: 'REF_NAME')}?token=TOKEN + %h5.prepend-top-default Pass build variables %p.light @@ -83,10 +93,18 @@ %code variables[VARIABLE]=VALUE to an API request. Variable values can be used to distinguish between triggered builds and normal builds. - %pre.append-bottom-0 + With cURL: + + %pre :plain curl -X POST \ -F token=TOKEN \ -F "ref=REF_NAME" \ -F "variables[RUN_NIGHTLY_BUILD]=true" \ #{builds_trigger_url(@project.id)} + %p.light + With webhook: + + %pre.append-bottom-0 + :plain + #{builds_trigger_url(@project.id, ref: 'REF_NAME')}?token=TOKEN&variables[RUN_NIGHTLY_BUILD]=true |