Sha256: 8e349e392e0b779990852a826246bf544f8d7617b3d8ab281bf9da522ca0352c

Contents?: true

Size: 801 Bytes

Versions: 6

Compression:

Stored size: 801 Bytes

Contents

# frozen_string_literal: true

require 'travis/cli/setup'

module Travis
  module CLI
    class Setup
      class Artifacts < Service
        description 'automatic artifact shipping to S3'
        service_name 'artifacts'

        def run
          travis_config['addons'] ||= {}
          configure 'artifacts', {}, travis_config['addons'] do |config|
            config['key'] = ask('Access key ID: ').to_s
            config['secret'] = ask('Secret access key: ') { |q| q.echo = '*' }.to_s
            config['bucket'] = ask('Bucket: ').to_s
            encrypt(config, 'key') if agree('Encrypt access key ID? ') { |q| q.default = 'yes' }
            encrypt(config, 'secret') if agree('Encrypt secret access key? ') { |q| q.default = 'yes' }
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
travis-1.14.0 lib/travis/cli/setup/artifacts.rb
travis-1.13.3 lib/travis/cli/setup/artifacts.rb
travis-1.13.2 lib/travis/cli/setup/artifacts.rb
travis-1.13.1 lib/travis/cli/setup/artifacts.rb
travis-1.13.0 lib/travis/cli/setup/artifacts.rb
travis-1.12.0 lib/travis/cli/setup/artifacts.rb