Sha256: c5cf7bf2531b4488b12399ae0c85e151bc52fffd3880a0f5339ce44caa3a7301

Contents?: true

Size: 439 Bytes

Versions: 16

Compression:

Stored size: 439 Bytes

Contents

require_relative 'services_helper'

module Kontena::Cli::Services
  class AddEnvCommand < Clamp::Command
    include Kontena::Cli::Common
    include ServicesHelper

    parameter "NAME", "Service name"
    parameter "ENV", "Environment variable"

    def execute
      require_api_url
      token = require_token
      data = {env: env}
      result = client(token).post("services/#{parse_service_id(name)}/envs", data)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
kontena-cli-0.11.7 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.11.6 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.11.5 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.11.4 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.11.3 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.11.2 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.11.1 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.11.0 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.10.3 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.10.2 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.10.1 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.10.0 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.9.3 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.9.2 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.9.1 lib/kontena/cli/services/add_env_command.rb
kontena-cli-0.9.0 lib/kontena/cli/services/add_env_command.rb