Class: Flaky::Providers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/flaky/providers/base.rb

Direct Known Subclasses

GithubActions, Semaphore

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/flaky/providers/base.rb', line 8

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/flaky/providers/base.rb', line 6

def config
  @config
end

Instance Method Details

#fetch_jobs(pipeline_id:) ⇒ Object

Returns Array of Hashes:

{ id:, name:, block_name:, result: }

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/flaky/providers/base.rb', line 20

def fetch_jobs(pipeline_id:)
  raise NotImplementedError
end

#fetch_log(job_id:) ⇒ Object

Returns raw log String for a job

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/flaky/providers/base.rb', line 25

def fetch_log(job_id:)
  raise NotImplementedError
end

#fetch_workflows(age: "24h") ⇒ Object

Returns Array of Hashes:

{ id:, pipeline_id:, branch:, commit_sha:, created_at: }

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/flaky/providers/base.rb', line 14

def fetch_workflows(age: "24h")
  raise NotImplementedError
end