Class: Fastlane::Actions::EnsureDockerMachineAvailableAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::EnsureDockerMachineAvailableAction
- Defined in:
- lib/fastlane/plugin/docker/actions/ensure_docker_machine_available.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
34 35 36 |
# File 'lib/fastlane/plugin/docker/actions/ensure_docker_machine_available.rb', line 34 def self. ["milch"] end |
.available_options ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/fastlane/plugin/docker/actions/ensure_docker_machine_available.rb', line 25 def self. [ FastlaneCore::ConfigItem.new(key: :machine_name, description: "Name of the Docker Machine", default_value: "fastlane-docker") ] end |
.description ⇒ Object
21 22 23 |
# File 'lib/fastlane/plugin/docker/actions/ensure_docker_machine_available.rb', line 21 def self.description "Makes sure a docker machine is created and available for us to use" end |
.is_supported?(platform) ⇒ Boolean
38 39 40 |
# File 'lib/fastlane/plugin/docker/actions/ensure_docker_machine_available.rb', line 38 def self.is_supported?(platform) true end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fastlane/plugin/docker/actions/ensure_docker_machine_available.rb', line 4 def self.run(params) client = DockerMachineClient.new machine_name = params[:machine_name] unless client.machine_available? machine_name UI. "No machine of name #{machine_name} found, creating one..." client.create_machine machine_name end client.start(machine_name) unless client.is_running? machine_name client.configure_env(machine_name) UI. "Your machine is ready to go!" Actions.lane_context[SharedValues::DOCKER_ACTIVE_MACHINE] = machine_name end |