Sha256: 886f7229da6cee781230c4ec0e287264b937018211f7f5b5128ad499e8def585

Contents?: true

Size: 584 Bytes

Versions: 34

Compression:

Stored size: 584 Bytes

Contents

require_relative '../services_helper'

module Kontena::Cli::Services::Envs
  class AddCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions
    include Kontena::Cli::Services::ServicesHelper

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

    def execute
      require_api_url
      token = require_token
      data = {env: env}
      spinner "Adding env variable to #{pastel.cyan(name)} service " do
        client(token).post("services/#{parse_service_id(name)}/envs", data)
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.10 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.9 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.8 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.7 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.6 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.5 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.4 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.3 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.2 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.1 lib/kontena/cli/services/envs/add_command.rb
krates-1.7.0 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.9 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.8 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.7 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.6 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.5 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.4 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.3 lib/kontena/cli/services/envs/add_command.rb
krates-1.6.2 lib/kontena/cli/services/envs/add_command.rb