Sha256: 8d7bf54613b189594c8f6d863431e55841a4c97c1b4a50d6322569ebe273abdf

Contents?: true

Size: 1.15 KB

Versions: 27

Compression:

Stored size: 1.15 KB

Contents

module DPL
  class Provider
    class AzureWebApps < Provider
      def config
        {
          "username"     => options[:username] || context.env['AZURE_WA_USERNAME'],
          "password"     => options[:password] || context.env['AZURE_WA_PASSWORD'],
          "site"         => options[:site] || context.env['AZURE_WA_SITE']
        }
      end

      def git_target
        "https://#{config['username']}:#{config['password']}@#{config['site']}.scm.azurewebsites.net:443/#{config['site']}.git"
      end

      def needs_key?
        false
      end

      def check_app
      end

      def check_auth
        error "missing Azure Git Deployment username" unless config['username']
        error "missing Azure Git Deployment password" unless config['password']
        error "missing Azure Web App name" unless config['site']
      end

      def push_app
        log "Deploying to Azure Web App '#{config['site']}'"

        if !!options[:verbose]
          context.shell "git push --force --quiet #{git_target} master"
        else
          context.shell "git push --force --quiet #{git_target} master > /dev/null 2>&1"
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
dpl-1.8.8.travis.1179.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.8.travis.1167.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.8.travis.1151.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.7 lib/dpl/provider/azure_webapps.rb
dpl-1.8.7.travis.1150.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.7.travis.1149.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.7.travis.1145.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.7.travis.1144.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.7.travis.1143.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.7.travis.1125.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.6.travis.1124.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.6 lib/dpl/provider/azure_webapps.rb
dpl-1.8.6.travis.1116.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.5 lib/dpl/provider/azure_webapps.rb
dpl-1.8.5.travis.1114.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.5.travis.1113.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.5.travis.1112.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.5.travis.1104.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.5.travis.1101.4 lib/dpl/provider/azure_webapps.rb
dpl-1.8.5.travis.1097.4 lib/dpl/provider/azure_webapps.rb