Sha256: f2301942429fa488f9e44bb3df6c35df6a4ef1d8ee6920ab929833c265abefba

Contents?: true

Size: 1.16 KB

Versions: 10

Compression:

Stored size: 1.16 KB

Contents

module Dpl
  module Providers
    class Boxfuse < Provider
      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/latest/boxfuse-commandline-latest-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

10 entries across 10 versions & 1 rubygems

Version Path
dpl-2.0.0.alpha.14 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.13 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.12 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.11 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.10 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.9 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.8 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.7 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.6 lib/dpl/providers/boxfuse.rb
dpl-2.0.0.alpha.5 lib/dpl/providers/boxfuse.rb