Module: TeamCity::Client::BuildTypes

Included in:
TeamCity::Client
Defined in:
lib/teamcity/client/build_types.rb

Overview

Defines methods related to build types (or build configurations)

Instance Method Summary collapse

Instance Method Details

#buildtype(options = {}) ⇒ Hashie::Mash

Get build configuration details

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Hashie::Mash)

    of build configuration details



24
25
26
27
# File 'lib/teamcity/client/build_types.rb', line 24

def buildtype(options={})
  assert_options(options)
  get("buildTypes/#{locator(options)}")
end

#buildtype_agent_requirements(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration agent_requirements

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration agent_requirements



86
# File 'lib/teamcity/client/build_types.rb', line 86

make_method :agent_requirements

#buildtype_artifact_dependencies(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration artifact_dependencies

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration artifact_dependencies



87
# File 'lib/teamcity/client/build_types.rb', line 87

make_method :artifact_dependencies

#buildtype_features(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration features

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration features



83
# File 'lib/teamcity/client/build_types.rb', line 83

make_method :features

#buildtype_parameters(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration parameters

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration parameters



49
50
51
52
53
# File 'lib/teamcity/client/build_types.rb', line 49

def buildtype_parameters(options={})
  assert_options(options)
  response = get("buildTypes/#{locator(options)}/parameters")
  response['property']
end

#buildtype_settings(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration settings

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration settings



39
40
41
42
43
# File 'lib/teamcity/client/build_types.rb', line 39

def buildtype_settings(options={})
  assert_options(options)
  response = get("buildTypes/#{locator(options)}/settings")
  response['property']
end

#buildtype_snapshot_dependencies(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration snapshot_dependencies

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration snapshot_dependencies



88
# File 'lib/teamcity/client/build_types.rb', line 88

make_method :snapshot_dependencies

#buildtype_steps(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration steps

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration steps



85
# File 'lib/teamcity/client/build_types.rb', line 85

make_method :steps

#buildtype_template(options = {}) ⇒ Hashie::Mash?

Get template associated with build configuration

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Hashie::Mash, nil)

    of build configuration parameters or nil if



59
60
61
62
63
64
65
66
# File 'lib/teamcity/client/build_types.rb', line 59

def buildtype_template(options={})
  assert_options(options)
  begin
    get("buildTypes/#{locator(options)}/template")
  rescue StandardError => e
    /No template associated/.match(e.to_s) ? nil : raise
  end
end

#buildtype_triggers(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration triggers

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration triggers



84
# File 'lib/teamcity/client/build_types.rb', line 84

make_method :triggers

#buildtype_vcs_root_entries(options = {}) ⇒ Array<Hashie::Mash>

Get build configuration vcs_root_entries

Parameters:

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

    option keys, :id => buildtype_id

Returns:

  • (Array<Hashie::Mash>)

    of build configuration vcs_root_entries



89
# File 'lib/teamcity/client/build_types.rb', line 89

make_method :vcs_root_entries

#buildtypesArray<Hashie::Mash>?

List of build types

Returns:

  • (Array<Hashie::Mash>, nil)

    of buildtypes or nil if no buildtypes exist



15
16
17
18
# File 'lib/teamcity/client/build_types.rb', line 15

def buildtypes
  response = get('buildTypes')
  response['buildType']
end