module Jujube::Components::Axes

Helper methods for creating matrix axes components.

Public Instance Methods

label_expression(name, values) click to toggle source

Specify a `label-expression` axis for a matrix job.

See {docs.openstack.org/infra/jenkins-job-builder/project_matrix.html}.

@param name [Symbol, String] The name of the axis. @param values [Array<String>] The values of the axis. @return [Hash] The specification for the axis.

# File lib/jujube/components/axes.rb, line 15
def label_expression(name, values)
  axis(name, values, :label_expression)
end
slave(name, values) click to toggle source

Specify a `slave` axis for a matrix job.

See {docs.openstack.org/infra/jenkins-job-builder/project_matrix.html}.

@param name [Symbol, String] The name of the axis. @param values [Array<String>] The values of the axis. @return [Hash] The specification for the axis.

# File lib/jujube/components/axes.rb, line 26
def slave(name, values)
  axis(name, values, :slave)
end

Private Instance Methods

axis(name, values, type) click to toggle source

Specify an axis for a matrix job.

See {docs.openstack.org/infra/jenkins-job-builder/project_matrix.html}.

@param name [Symbol, String] The name of the axis. @param values [Array<String>] The values of the axis. @param type [Symbol, String] The axis type. @return [Hash] The specification for the axis.

# File lib/jujube/components/axes.rb, line 40
def axis(name, values, type)
  options = {type: canonicalize(type), name: canonicalize(name), values: values}
  to_config("axis", options)
end