gitlab-org--gitlab-foss/app/views/projects/triggers/_index.html.haml
Takuya Noguchi 55826e7783 Remove .card-title from .card-header for BS4 migration
Replaces .card-header > hX.card-title with hX.card-header to remove
.card-title. At a occurrence where bold styling is not necessary,
div.card-header is used instead.
By full removal of .card-title at the moment, all workarounds for
BS4's card-title are removed as well.

More information: https://getbootstrap.com/docs/4.0/migration/#panels

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-10-19 22:50:34 +09:00

102 lines
3.1 KiB
Text

.row.prepend-top-default.append-bottom-default.triggers-container
.col-lg-12
= render "projects/triggers/content"
.card
.card-header
Manage your project's triggers
.card-body
= render "projects/triggers/form", btn_text: "Add trigger"
%hr
- if @triggers.any?
.table-responsive.triggers-list
%table.table
%thead
%th
%strong Token
%th
%strong Description
%th
%strong Owner
%th
%strong Last used
%th
= render partial: 'projects/triggers/trigger', collection: @triggers, as: :trigger
- else
%p.settings-message.text-center.append-bottom-default
No triggers have been created yet. Add one using the form above.
.card-footer
%p
In the following examples, you can see the exact API call you need to
make in order to rebuild a specific
%code ref
(branch or tag) with a trigger token.
%p
All you need to do is replace the
%code TOKEN
and
%code REF_NAME
with the trigger token and the branch or tag name respectively.
%h5.prepend-top-default
Use cURL
%p.light
Copy one of the tokens above, set your branch or tag name, and that
reference will be rebuilt.
%pre
:plain
curl -X POST \
-F token=TOKEN \
-F ref=REF_NAME \
#{builds_trigger_url(@project.id)}
%h5.prepend-top-default
Use .gitlab-ci.yml
%p.light
In the
%code .gitlab-ci.yml
of another project, include the following snippet.
The project will be rebuilt at the end of the pipeline.
%pre
:plain
trigger_build:
stage: deploy
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 job variables
%p.light
Add
%code variables[VARIABLE]=VALUE
to an API request. Variable values can be used to distinguish between triggered pipelines and normal pipelines.
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