Class: Proxy::AnsibleDirector::Runners::PodmanPushRunner
- Inherits:
-
Dynflow::Runner::Base
- Object
- Dynflow::Runner::Base
- Proxy::AnsibleDirector::Runners::PodmanPushRunner
- Includes:
- Dynflow::Runner::ProcessManagerCommand
- Defined in:
- lib/smart_proxy_ansible_director/runners/podman_push_runner.rb
Instance Method Summary collapse
-
#initialize(podman_push_input, suspended_action: nil) ⇒ PodmanPushRunner
constructor
A new instance of PodmanPushRunner.
- #publish_data(message, type = 'debug') ⇒ Object
- #refresh ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(podman_push_input, suspended_action: nil) ⇒ PodmanPushRunner
Returns a new instance of PodmanPushRunner.
12 13 14 15 16 |
# File 'lib/smart_proxy_ansible_director/runners/podman_push_runner.rb', line 12 def initialize(podman_push_input, suspended_action: nil) super suspended_action: suspended_action puts podman_push_input @ee_id = podman_push_input[:ee_id] end |
Instance Method Details
#publish_data(message, type = 'debug') ⇒ Object
36 37 38 |
# File 'lib/smart_proxy_ansible_director/runners/podman_push_runner.rb', line 36 def publish_data(, type = 'debug') @continuous_output.add_output(.force_encoding('UTF-8'), type) end |
#refresh ⇒ Object
30 31 32 33 34 |
# File 'lib/smart_proxy_ansible_director/runners/podman_push_runner.rb', line 30 def refresh @process_manager.process(timeout: 0.1) unless @process_manager.done? puts @continuous_output.humanize publish_exit_status(@process_manager.status) if @process_manager.done? end |
#start ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/smart_proxy_ansible_director/runners/podman_push_runner.rb', line 18 def start # TODO: Parametrize image_name = "ansible_director/#{@ee_id}:latest" registry = 'centos9-katello-devel-stable.example.com:4321' cmd = <<~CMD podman push --tls-verify=false #{image_name} #{registry}/#{image_name} CMD initialize_command('bash', '-c', cmd) end |