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:


28
29
30
# File 'lib/gitlab/client/deployments.rb', line 28

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:


16
17
18
# File 'lib/gitlab/client/deployments.rb', line 16

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