Skip to content

Commit

Permalink
Merge cf168e1 into 56ab84a
Browse files Browse the repository at this point in the history
  • Loading branch information
gogolok committed Jul 31, 2015
2 parents 56ab84a + cf168e1 commit 173e599
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Supported Providers:
Dpl supports the following providers:

* [Anynines](#anynines)
* [AppFog](#appfog)
* [Biicode](#biicode)
* [Bintray](#bintray)
Expand Down Expand Up @@ -340,6 +341,18 @@ It is possible to set file-specific `Cache-Control` and `Expires` headers using

dpl --provider=opsworks --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --app-id=<app-id> --migrate --wait-until-deployed

### Anynines:

#### Options:

* **username**: anynines username.
* **password**: anynines password.
* **organization**: anynines target organization.
* **space**: anynines target space

#### Examples:

dpl --provider=anynines --username=<username> --password=<password> --organization=<organization> --space=<space>

### Appfog:

Expand Down
1 change: 1 addition & 0 deletions lib/dpl/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module DPL
class Provider
include FileUtils

autoload :Anynines, 'dpl/provider/anynines'
autoload :Appfog, 'dpl/provider/appfog'
autoload :Atlas, 'dpl/provider/atlas'
autoload :Biicode, 'dpl/provider/biicode'
Expand Down
13 changes: 13 additions & 0 deletions lib/dpl/provider/anynines.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module DPL
class Provider
class Anynines < CloudFoundry

def check_auth
initial_go_tools_install
context.shell "cf api https://api.de.a9s.eu"
context.shell "cf login --u #{option(:username)} --p #{option(:password)} --o #{option(:organization)} --s #{option(:space)}"
end

end
end
end
41 changes: 41 additions & 0 deletions spec/provider/anynines_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
require 'spec_helper'
require 'dpl/provider/anynines'

describe DPL::Provider::Anynines do
subject :provider do
described_class.new(DummyContext.new, username: 'mallomar',
password: 'myreallyawesomepassword',
organization: 'myorg',
space: 'outer')
end

describe "#check_auth" do
example do
expect(provider.context).to receive(:shell).with('wget http://go-cli.s3-website-us-east-1.amazonaws.com/releases/latest/cf-cli_amd64.deb -qO temp.deb && sudo dpkg -i temp.deb')
expect(provider.context).to receive(:shell).with('rm temp.deb')
expect(provider.context).to receive(:shell).with('cf api https://api.de.a9s.eu')
expect(provider.context).to receive(:shell).with('cf login --u mallomar --p myreallyawesomepassword --o myorg --s outer')
provider.check_auth
end
end

describe "#check_app" do
example do
expect{provider.check_app}.to raise_error('Application must have a manifest.yml for unattended deployment')
end
end

describe "#needs_key?" do
example do
expect(provider.needs_key?).to eq(false)
end
end

describe "#push_app" do
example do
expect(provider.context).to receive(:shell).with('cf push')
expect(provider.context).to receive(:shell).with('cf logout')
provider.push_app
end
end
end

0 comments on commit 173e599

Please sign in to comment.