Module: Jujube::Components::Triggers
Overview
Helper methods for creating trigger components.
pollurl Helpers collapse
-
#url(the_url, options = {}) {|content_types| ... } ⇒ Hash
Configure a URL to poll in a #pollurl component.
pollurl Content Types collapse
Instance Method Summary collapse
-
#gitlab(options = {}) ⇒ Hash
Specify a
gitlab
trigger for a job. -
#pollscm(options = {}) ⇒ Hash
Specify a
pollscm
trigger for a job. -
#pollurl(options = {}) {|urls| ... } ⇒ Hash
Specify a
pollurl
trigger for a job. -
#reverse(options = {}) ⇒ Hash
Specify a
reverse
trigger for a job.
Instance Method Details
#gitlab(options = {}) ⇒ Hash
Specify a gitlab
trigger for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/triggers.html#triggers.gitlab.
15 |
# File 'lib/jujube/components/triggers.rb', line 15 standard_component :gitlab |
#json(*paths) ⇒ Hash
103 104 105 |
# File 'lib/jujube/components/triggers.rb', line 103 def json(*paths) {"json" => paths} end |
#pollscm(options = {}) ⇒ Hash
Specify a pollscm
trigger for a job.
This trigger requires jenkins-job-builder 1.3.0 or later.
See https://jenkins-job-builder.readthedocs.io/en/latest/triggers.html#triggers.pollscm.
26 |
# File 'lib/jujube/components/triggers.rb', line 26 standard_component :pollscm |
#pollurl(options = {}) {|urls| ... } ⇒ Hash
Specify a pollurl
trigger for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/triggers.html#triggers.pollurl.
pollurl
can poll several URLs. Each URL specification is added
in a nested configuration block using the #url method.
48 49 50 |
# File 'lib/jujube/components/triggers.rb', line 48 def pollurl( = {}, &block) to_config("pollurl", (:urls, , &block)) end |
#reverse(options = {}) ⇒ Hash
Specify a reverse
trigger for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/triggers.html#triggers.reverse.
63 64 65 66 |
# File 'lib/jujube/components/triggers.rb', line 63 def reverse( = {}) formatted_jobs = Array([:jobs]).join(", ") to_config("reverse", .merge(jobs: formatted_jobs)) end |
#simple ⇒ Hash
93 94 95 |
# File 'lib/jujube/components/triggers.rb', line 93 def simple {"simple" => true} end |
#text(*regexes) ⇒ Hash
123 124 125 |
# File 'lib/jujube/components/triggers.rb', line 123 def text(*regexes) {"text" => regexes} end |
#url(the_url, options = {}) {|content_types| ... } ⇒ Hash
81 82 83 84 |
# File 'lib/jujube/components/triggers.rb', line 81 def url(the_url, = {}, &block) = {url: the_url}.merge!() ((:check_content, , &block)) end |