Sha256: 2d269ef8dca8d78e84759ce19438395cb76bff96ece113c3f96c49b8b573b9b9

Contents?: true

Size: 592 Bytes

Versions: 42

Compression:

Stored size: 592 Bytes

Contents

class KuberKit::Actions::KubectlEnv
  include KuberKit::Import[
    "core.artifact_path_resolver",
    "shell.local_shell",
    "ui"
  ]

  Contract Hash => Any
  def call(options)
    configuration   = KuberKit.current_configuration
    kubeconfig_path = configuration.kubeconfig_path

    if kubeconfig_path.is_a?(KuberKit::Core::ArtifactPath)
      kubeconfig_path = artifact_path_resolver.call(kubeconfig_path)
    end

    ui.print_info("ENV", "export KUBECONFIG=#{kubeconfig_path}")

    true
  rescue KuberKit::Error => e
    ui.print_error("Error", e.message)
    
    false
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
kuber_kit-1.3.8 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.7 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.1.8 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.6 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.1.7 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.5 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.4 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.1.6 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.3 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.2 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.1.5 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.1 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.3.0 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.1.4 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.2.7 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.2.6 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.2.5 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.2.4 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.2.2 lib/kuber_kit/actions/kubectl_env.rb
kuber_kit-1.1.2 lib/kuber_kit/actions/kubectl_env.rb