Module: Gitlab::Client::Deployments

Included in:
Gitlab::Client
Defined in:
lib/gitlab/client/deployments.rb

Overview

Defines methods related to deployments.

Instance Method Summary collapse

Instance Method Details

#deployment(project, id) ⇒ Gitlab::ObjectifiedHash

Gets a single deployment.

Examples:

Gitlab.deployment(5, 36)

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • id (Integer)

    The ID of an deployment.

Returns:



30
31
32
# File 'lib/gitlab/client/deployments.rb', line 30

def deployment(project, id)
  get("/projects/#{url_encode project}/deployments/#{id}")
end

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

Gets a list of project deployments.

Examples:

Gitlab.deployments(5)
Gitlab.deployments(5, { per_page: 10, page:  2 })

Parameters:

  • project (Integer, String)

    The ID or name of a project.

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

    A customizable set of options.

Options Hash (options):

  • :page (Integer)

    The page number.

  • :per_page (Integer)

    The number of results per page.

Returns:



18
19
20
# File 'lib/gitlab/client/deployments.rb', line 18

def deployments(project, options = {})
  get("/projects/#{url_encode project}/deployments", query: options)
end