Sha256: e4d0fc15df5966174787d6f985e15493e54b872275955694156d9b759df1a7fd
Contents?: true
Size: 996 Bytes
Versions: 34
Compression:
Stored size: 996 Bytes
Contents
# frozen_string_literal: true # DeployRubygem - deploy a gem using rake # Containing a class module DeployRubygem # Using Kitchen to deploy and manage Kitchen class Kitchen attr_reader :kitchen_name, :cookbook def initialize(kitchen_name, cookbook) @kitchen_name = kitchen_name @cookbook = cookbook end def check_file ::File.join("#{kitchen_name}_check.log") end def converge system("kitchen converge #{kitchen_name}") end def destroy system("kitchen destroy #{kitchen_name}") end def ip switch_to_cookbook system("kitchen exec #{kitchen_name} -c 'hostname -I'") end def verify(showing: true) cookbook.switch_to_cookbook if showing system("kitchen verify #{kitchen_name}") else system("kitchen verify #{kitchen_name} > #{check_file}") end end def target verify(showing: false) system("grep -n Target #{check_file}") end end end
Version data entries
34 entries across 34 versions & 1 rubygems