Sha256: bd0345a939dbafd699cf584570ce7d8df83af78eb5ed94cadb10f2033cd193a5

Contents?: true

Size: 1.21 KB

Versions: 9

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true

module Dpl
  module Providers
    class Boxfuse < Provider
      register :boxfuse

      status :alpha

      description sq(<<-STR)
        tbd
      STR

      env :boxfuse

      opt '--user USER', required: true
      opt '--secret SECRET', required: true, secret: true
      opt '--payload PAYLOAD'
      opt '--app APP'
      opt '--version VERSION'
      opt '--env ENV'
      opt '--config_file FILE', alias: :configfile, deprecated: :configfile
      opt '--extra_args ARGS'

      URL = 'https://files.boxfuse.com/com/boxfuse/client/boxfuse-commandline/1.33.0.1460/boxfuse-commandline-1.33.0.1460-linux-x64.tar.gz'

      cmds install: 'curl -L %{URL} | tar xz',
           deploy: 'boxfuse/boxfuse run %{deploy_opts}'

      def validate
        # TODO: check if the config file exists (it seems `boxfuse` doesn't)
      end

      def install
        shell :install
      end

      def deploy
        shell :deploy
      end

      private

      def deploy_opts
        opts = [*opts_for(%i[user secret payload app env version], prefix: '-')]
        opts << "-configfile=#{config_file}" if config_file?
        opts << extra_args if extra_args?
        opts.join(' ')
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
dpl-2.0.5.2.beta.1 lib/dpl/providers/boxfuse.rb
dpl-2.0.5.1 lib/dpl/providers/boxfuse.rb
dpl-2.0.5.beta.2.1 lib/dpl/providers/boxfuse.rb
dpl-2.0.5.beta.2 lib/dpl/providers/boxfuse.rb
dpl-2.0.5 lib/dpl/providers/boxfuse.rb
dpl-2.0.5.beta.1 lib/dpl/providers/boxfuse.rb
dpl-2.0.5.beta lib/dpl/providers/boxfuse.rb
travis_dpl_test-2.0.3.beta.4.ror.1 lib/dpl/providers/boxfuse.rb
travis_dpl_test-2.0.3.beta.4.ror lib/dpl/providers/boxfuse.rb