Module: Jujube::Components::Publishers
Overview
Helper methods for creating publisher components.
trigger_parameterized_builds Builds collapse
-
#build(options = {}) ⇒ Hash
Configure a
build
for a #trigger_parameterized_builds publisher.
xunit Test Types collapse
-
#gtest(options = {}) ⇒ Hash
Configure a
gtest
test type for an #xunit publisher. -
#unittest(options = {}) ⇒ Hash
Configure a
unittest
test type for an #xunit publisher.
Instance Method Summary collapse
-
#archive(options = {}) ⇒ Hash
Specify an
archive
publisher for a job. -
#cppcheck(options = {}) ⇒ Hash
Specify a
cppcheck
publisher for a job. -
#email_ext(options = {}) ⇒ Hash
Specify an
email-ext
publisher for a job. -
#fitnesse(options = {}) ⇒ Hash
Specify a
fitnesse
publisher for a job. -
#gitlab_notifier(options = {}) ⇒ Hash
Specify a
gitlab-notifier
publisher for a job. -
#ircbot(options = {}) ⇒ Hash
Specify an
ircbot
publisher for a job. -
#junit(options = {}) ⇒ Hash
Specify a
junit
publisher for a job. -
#trigger(options = {}) ⇒ Hash
Specify a
trigger
publisher for a job. -
#trigger_parameterized_builds {|builds| ... } ⇒ Hash
Specify a
trigger-parameterized-builds
publisher for a job. -
#xunit(options = {}) {|types| ... } ⇒ Hash
Specify an
xunit
publisher for a job.
Instance Method Details
#archive(options = {}) ⇒ Hash
Specify an archive
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.archive.
15 |
# File 'lib/jujube/components/publishers.rb', line 15 standard_component :archive |
#build(options = {}) ⇒ Hash
Configure a build
for a #trigger_parameterized_builds publisher.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/jujube/components/publishers.rb', line 135 def build( = {}) identity = ->(value) { value } transforms = { predefined_parameters: ->(value) do result = value.map { |k,v| "#{k}=#{v}" }.join("\n") value.size > 1 ? result + "\n" : result end, boolean_parameters: ->(value) do Hash[value.map { |k,v| [k.to_s, v] }] end, git_revision: ->(value) do value.is_a?(Hash) ? (value) : value end } = .map do |k, v| transform = transforms.fetch(k) { identity } [k, transform.call(v)] end (Hash[]) end |
#cppcheck(options = {}) ⇒ Hash
Specify a cppcheck
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.cppcheck.
24 |
# File 'lib/jujube/components/publishers.rb', line 24 standard_component :cppcheck |
#email_ext(options = {}) ⇒ Hash
Specify an email-ext
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.email-ext.
33 |
# File 'lib/jujube/components/publishers.rb', line 33 standard_component :email_ext |
#fitnesse(options = {}) ⇒ Hash
Specify a fitnesse
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.fitnesse.
42 |
# File 'lib/jujube/components/publishers.rb', line 42 standard_component :fitnesse |
#gitlab_notifier(options = {}) ⇒ Hash
Specify a gitlab-notifier
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.gitlab-notifier.
51 |
# File 'lib/jujube/components/publishers.rb', line 51 standard_component :gitlab_notifier |
#gtest(options = {}) ⇒ Hash
Configure a gtest
test type for an #xunit publisher.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.xunit.
168 |
# File 'lib/jujube/components/publishers.rb', line 168 named_config :gtest |
#ircbot(options = {}) ⇒ Hash
Specify an ircbot
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.ircbot.
60 |
# File 'lib/jujube/components/publishers.rb', line 60 standard_component :ircbot |
#junit(options = {}) ⇒ Hash
Specify a junit
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.junit.
69 |
# File 'lib/jujube/components/publishers.rb', line 69 standard_component :junit |
#trigger(options = {}) ⇒ Hash
Specify a trigger
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.trigger.
78 |
# File 'lib/jujube/components/publishers.rb', line 78 standard_component :trigger |
#trigger_parameterized_builds {|builds| ... } ⇒ Hash
Specify a trigger-parameterized-builds
publisher for a job.
trigger-parameterized-builds
can trigger multiple sets of builds,
each with their own configuration. Each build specification is added
in a nested configuration block using the #build method.
99 100 101 102 103 |
# File 'lib/jujube/components/publishers.rb', line 99 def trigger_parameterized_builds builds = [] yield(builds) if block_given? {"trigger-parameterized-builds" => builds} end |
#unittest(options = {}) ⇒ Hash
Configure a unittest
test type for an #xunit publisher.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.xunit.
177 |
# File 'lib/jujube/components/publishers.rb', line 177 named_config :unittest |
#xunit(options = {}) {|types| ... } ⇒ Hash
Specify an xunit
publisher for a job.
See https://jenkins-job-builder.readthedocs.io/en/latest/publishers.html#publishers.xunit.
xunit
can publish multiple sets of test results. The specification for each set
of test results is added in a nested configuration block using the #unittest method.
123 124 125 |
# File 'lib/jujube/components/publishers.rb', line 123 def xunit( = {}, &block) to_config("xunit", (:types, , &block)) end |