Class: Kettle::Family::Workflow
- Inherits:
-
Object
- Object
- Kettle::Family::Workflow
- Defined in:
- lib/kettle/family/workflow.rb
Constant Summary collapse
- DEFAULT_COMMANDS =
{ "template" => "bundle exec kettle-jem install", "test" => "bundle exec kettle-test", "lint" => "bundle exec rake rubocop_gradual", "docs" => "bundle exec rake yard" }.freeze
Instance Method Summary collapse
-
#initialize(command:, config:, members:, execute: false, commit: false, allow_dirty: false, publish: false, push: false, tag: false, start_step: nil, local_ci: false, continue_ci_failures: false) ⇒ Workflow
constructor
A new instance of Workflow.
- #results ⇒ Object
Constructor Details
#initialize(command:, config:, members:, execute: false, commit: false, allow_dirty: false, publish: false, push: false, tag: false, start_step: nil, local_ci: false, continue_ci_failures: false) ⇒ Workflow
Returns a new instance of Workflow.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/kettle/family/workflow.rb', line 18 def initialize(command:, config:, members:, execute: false, commit: false, allow_dirty: false, publish: false, push: false, tag: false, start_step: nil, local_ci: false, continue_ci_failures: false) @command = command @config = config @members = members @execute = execute @commit = commit @allow_dirty = allow_dirty @publish = publish @push = push @tag = tag @start_step = start_step @local_ci = local_ci @continue_ci_failures = continue_ci_failures @gem_signing_password = nil end |
Instance Method Details
#results ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/kettle/family/workflow.rb', line 34 def results return check_results if command == "check" return release_results if command == "release" guard_family_commit! runner = CommandRunner.new(execute: execute) command_text = workflow_command results = members.each_with_object([]) do |member, memo| result = runner.call(member: member, phase: command, command: command_text, env: workflow_env) memo << result break memo unless result.ok? normalize_lockfiles(member: member, runner: runner, memo: memo) if command == "template" end append_family_commit(results: results, runner: runner) results end |