Method: Gitlab::Client::PipelineSchedules#create_pipeline_schedule_variable

Defined in:
lib/gitlab/client/pipeline_schedules.rb

#create_pipeline_schedule_variable(project, pipeline_schedule_id, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>

Create a pipeline schedule variable.

Examples:

Gitlab.create_pipeline_schedule_variable(5, 1, { key: 'foo', value: 'bar' })

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • trigger_id (Integer)

    The pipeline schedule ID.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :key (String)

    The key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed.

  • :value (String)

    The value of a variable

Returns:

[View source]

127
128
129
# File 'lib/gitlab/client/pipeline_schedules.rb', line 127

def create_pipeline_schedule_variable(project, pipeline_schedule_id, options = {})
  post("/projects/#{url_encode project}/pipeline_schedules/#{pipeline_schedule_id}/variables", body: options)
end