module Jujube::Components::Scm
Helper methods for creating SCM components.
Public Instance Methods
Specify a `bundle` to check for a {#store} SCM.
@param name [String] The name of the bundle to check. @return [Hash] The specification for the package.
# File lib/jujube/components/scm.rb, line 54 def bundle(name) {"bundle" => name} end
Specify a `package` to check for a {#store} SCM.
@param name [String] The name of the package to check. @return [Hash] The specification for the package.
# File lib/jujube/components/scm.rb, line 46 def package(name) {"package" => name} end
Specify a `store` SCM for a job.
See {docs.openstack.org/infra/jenkins-job-builder/scm.html#scm.store}.
`store` can watch multiple pundles (packages or bundles) The specification for each pundle is added in a nested configuration block using the {#package} or {#bundle} method.
@example
job "store-example" do |j| j.scm << store(script: "SCRIPT", repository: "REPO") do |pundles| pundles << package("PACKAGE") pundles << bundle("BUNDLE") end end
@param options [Hash] Top-level options for configuring the component. @yieldparam pundles [Array] An array to which nested pundle specifications should be
added by the block.
@return [Hash] The specification for the component.
# File lib/jujube/components/scm.rb, line 36 def store(options = {}, &block) to_config("store", nested_options(:pundles, options, &block)) end