gitlab-org--gitlab-foss/app/views/projects/triggers/index.html.haml
Kamil Trzcinski ba68facf8d CI details cleanup
- Add page titles to CI settings.
- Fix CI admin navigation.
- Remove duplicated scope.
- Use monospace font for commit sha.
- Add page title and header title to build page.
- Proper authorization for cancel/retry builds.
- Use gitlab pagination theme for builds and group members.
- Don't paginate builds widget on build page.
- Add badges to commit page Changes/Builds tabs.
- Add "Builds" to commit Builds tab page title.
- Add and use Ci::Build#retryable? method.
- Add CI::Build#retried? method.
- Allow all failed commit builds to be retried.
- Proper authorization for cancel/retry all builds.
- Remove unused param.
- Use time_ago_with_tooltip where appropriate.
- Tweak builds index text
- Remove duplication between builds/build and commit_statuses/commit_status.
- Use POST rather than GET for canceling and retrying builds.
- Remove redundant URL helpers.
- Add build ID to build page.
- Link branch name on build page.
- Move commit/:sha/ci to commit/:sha/builds.
2015-11-05 15:24:27 +01:00

69 lines
1.6 KiB
Text

- page_title "Triggers"
%h3.page-title
Triggers
%p.light
Triggers can be used to force a rebuild of a specific branch or tag with an API call.
%hr.clearfix
-if @triggers.any?
.table-holder
%table.table
%thead
%th Token
%th Last used
%th
= render partial: 'trigger', collection: @triggers, as: :trigger
- else
%h4 No triggers
= form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create'), html: { class: 'form-horizontal' } do |f|
.clearfix
= f.submit "Add Trigger", class: 'btn btn-success pull-right'
%hr.clearfix
-if @triggers.any?
%h3
Use CURL
%p.light
Copy the token above and set your branch or tag name. This is the reference that will be rebuild.
%pre
:plain
curl -X POST \
-F token=TOKEN \
#{ci_build_trigger_url(@ci_project.id, 'REF_NAME')}
%h3
Use .gitlab-ci.yml
%p.light
Copy the snippet to
%i .gitlab-ci.yml
of dependent project.
At the end of your build it will trigger this project to rebuilt.
%pre
:plain
trigger:
type: deploy
script:
- "curl -X POST -F token=TOKEN #{ci_build_trigger_url(@ci_project.id, 'REF_NAME')}"
%h3
Pass build variables
%p.light
Add
%strong variables[VARIABLE]=VALUE
to API request.
The value of variable could then be used to distinguish triggered build from normal one.
%pre
:plain
curl -X POST \
-F token=TOKEN \
-F "variables[RUN_NIGHTLY_BUILD]=true" \
#{ci_build_trigger_url(@ci_project.id, 'REF_NAME')}