dpl 1.5.2.travis.217.2 → 1.5.2.travis.218.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +180 -173
- data/lib/dpl/provider.rb +1 -0
- data/lib/dpl/provider/divshot.rb +23 -0
- data/spec/provider/divshot_spec.rb +28 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTVkNjk1NDU1NzZiMmJhYzQxZWY4NmI1MDBlNmM0MDVhOTIxOGMzZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGUyYTJkMTE1ZTc5ZWY3Njg2ZmE0NGM0MDQwMDljYzk3NzUxY2ZlZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGE3ODdiNmQ3NWVkZGE0ZDgxMDM0ZGQ4MDM4YmY0N2Y0ZmQxN2JkN2Y1Mzg4
|
10
|
+
ZWI5YzQ3MjZiOTk3MDk0OGZmMDk3M2E4NmJmZjc1Y2ExNDg3NGM0ZjA2MTVl
|
11
|
+
ZmI0Y2E5ZGNiODg4NDM5ZjE1YjI5NzEwZjhmOTAxMmZhNjMzOTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2ExMzE1NWIxOTQ0NjcxMTBiMzQ3YjNmODY4NzVkMDNmMThjZWE3ZTUxMjcz
|
14
|
+
MDI0Y2UyODY5ZjNhMzk4OWYyNjdkMGE5ZDI0OTQwMjNjMGQ2ODc0MjM0ZDQ3
|
15
|
+
OWU5M2U0ZTM4MmRmZjUwNjA1NmQ3NWRiZTViMTVhNzM4OGMwNDI=
|
data/README.md
CHANGED
@@ -1,173 +1,180 @@
|
|
1
|
-
# Dpl [![Build Status](https://travis-ci.org/travis-ci/dpl.png?branch=master)](https://travis-ci.org/travis-ci/dpl]) [![Code Climate](https://codeclimate.com/github/travis-ci/dpl.png)](https://codeclimate.com/github/travis-ci/dpl)
|
2
|
-
Dpl (dee-pee-ell) is a deploy tool made for continuous deployment. Developed and used by Travis CI.
|
3
|
-
|
4
|
-
## Supported Providers:
|
5
|
-
Dpl supports the following providers:
|
6
|
-
|
7
|
-
* [AppFog](#appfog)
|
8
|
-
* [Cloud Foundry](#cloud-foundry)
|
9
|
-
* [cloudControl](#
|
10
|
-
* [dotCloud (experimental)](#dotcloud)
|
11
|
-
* [Engine Yard](#engine-yard)
|
12
|
-
* [Heroku](#heroku)
|
13
|
-
* [Nodejitsu](#nodejitsu)
|
14
|
-
* [NPM](#npm)
|
15
|
-
* [Openshift](#openshift)
|
16
|
-
* [PyPi](#pypi)
|
17
|
-
* [RubyGems](#rubygems)
|
18
|
-
* [S3](#s3)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
*
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
*
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
* **
|
43
|
-
* **
|
44
|
-
* **
|
45
|
-
* **
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
*
|
50
|
-
*
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
dpl --provider=heroku --
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
* **
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
* **
|
78
|
-
* **
|
79
|
-
* **
|
80
|
-
* **
|
81
|
-
* **
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
dpl --provider=engineyard --
|
87
|
-
dpl --provider=engineyard --
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
* **
|
95
|
-
* **
|
96
|
-
* **
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
dpl --provider=openshift --username=<username> --password=<password> --domain=<domain>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
* **
|
109
|
-
* **
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
* **
|
131
|
-
* **
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
dpl --provider=pypi --user=<username> --password=<password>
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
* **
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
* **
|
155
|
-
* **
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
* **
|
167
|
-
* **
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
dpl --provider=appfog --email=<email> --password=<password>
|
173
|
-
|
1
|
+
# Dpl [![Build Status](https://travis-ci.org/travis-ci/dpl.png?branch=master)](https://travis-ci.org/travis-ci/dpl]) [![Code Climate](https://codeclimate.com/github/travis-ci/dpl.png)](https://codeclimate.com/github/travis-ci/dpl)
|
2
|
+
Dpl (dee-pee-ell) is a deploy tool made for continuous deployment. Developed and used by Travis CI.
|
3
|
+
|
4
|
+
## Supported Providers:
|
5
|
+
Dpl supports the following providers:
|
6
|
+
|
7
|
+
* [AppFog](#appfog)
|
8
|
+
* [Cloud Foundry](#cloud-foundry)
|
9
|
+
* [cloudControl](#cloudcontroll)
|
10
|
+
* [dotCloud (experimental)](#dotcloud)
|
11
|
+
* [Engine Yard](#engine-yard)
|
12
|
+
* [Heroku](#heroku)
|
13
|
+
* [Nodejitsu](#nodejitsu)
|
14
|
+
* [NPM](#npm)
|
15
|
+
* [Openshift](#openshift)
|
16
|
+
* [PyPi](#pypi)
|
17
|
+
* [RubyGems](#rubygems)
|
18
|
+
* [S3](#s3)
|
19
|
+
* [Divshot.io](#divshot-io)
|
20
|
+
|
21
|
+
## Installation:
|
22
|
+
|
23
|
+
Dpl is published to rubygems.
|
24
|
+
|
25
|
+
* Dpl requires ruby with a version greater than 1.8.7
|
26
|
+
* To install: `gem install dpl`
|
27
|
+
|
28
|
+
## Usage:
|
29
|
+
|
30
|
+
###Security Warning:
|
31
|
+
|
32
|
+
Running dpl in a terminal that saves history is insecure as your password/api key will be saved as plain text by it.
|
33
|
+
|
34
|
+
###Global Flags
|
35
|
+
* `--provider=<provider>` sets the provider you want to deploy to. Every provider has slightly different flags, which are documented in the section about your provider following.
|
36
|
+
* Dpl will deploy by default from the latest commit. Use the `--skip_cleanup` flag to deploy from the current file state. Note that many providers deploy by git and could ignore this option.
|
37
|
+
|
38
|
+
|
39
|
+
### Heroku:
|
40
|
+
|
41
|
+
#### Options:
|
42
|
+
* **api-key**: Heroku API Key
|
43
|
+
* **strategy[git/anvil]**: Deployment strategy for Dpl. Defaults to anvil.
|
44
|
+
* **app**: Heroku app name. Defaults to the name of your git repo.
|
45
|
+
* **username**: heroku username. Not necessary if api-key is used. Requires git strategy.
|
46
|
+
* **password**: heroku password. Not necessary if api-key is used. Requires git strategy.
|
47
|
+
|
48
|
+
#### Git vs Anvil Deploy:
|
49
|
+
* Anvil will run the [buildpack](https://devcenter.heroku.com/articles/buildpacks) compilation step on the Travis CI VM, whereas the Git strategy will run it on a Heroku dyno, which provides the same environment the application will then run under and might be slightly faster.
|
50
|
+
* The Git strategy allows using *user* and *password* instead of *api-key*.
|
51
|
+
* When using Git, Heroku might send you an email for every deploy, as it adds a temporary SSH key to your account.
|
52
|
+
|
53
|
+
As a rule of thumb, you should switch to the Git strategy if you run into issues with Anvil or if you're using the [user-env-compile](https://devcenter.heroku.com/articles/labs-user-env-compile) plugin.
|
54
|
+
|
55
|
+
#### Examples:
|
56
|
+
|
57
|
+
dpl --provider=heroku --api-key=`heroku auth:token`
|
58
|
+
dpl --provider=heroku --strategy=git --username=<username> --password=<password> --app=<application>
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
### Nodejitsu:
|
64
|
+
|
65
|
+
#### Options:
|
66
|
+
|
67
|
+
* **username**: Nodejitsu Username
|
68
|
+
* **api-key**: Nodejitsu API Key
|
69
|
+
|
70
|
+
#### Examples:
|
71
|
+
dpl --provider=nodejitsu --username=<username> --api-key=<api-key>
|
72
|
+
|
73
|
+
### Engine Yard:
|
74
|
+
|
75
|
+
#### Options:
|
76
|
+
|
77
|
+
* **api-key**: Engine Yard Api Key
|
78
|
+
* **username**: Engine Yard username. Not necessary if api-key is used. Requires git strategy.
|
79
|
+
* **password**: Engine Yard password. Not necessary if api-key is used.
|
80
|
+
* **app**: Engine Yard Application name. Defaults to git repo's name.
|
81
|
+
* **environment**: Engine Yard Application Environment. Optional.
|
82
|
+
* **migrate**: Engine Yard migration commands. Optional.
|
83
|
+
|
84
|
+
#### Examples:
|
85
|
+
|
86
|
+
dpl --provider=engineyard --api-key=<api-key>
|
87
|
+
dpl --provider=engineyard --username=<username> --password=<password> --environment=staging
|
88
|
+
dpl --provider=engineyard --api-key=<api-key> --app=<application> --migrate=`rake db:migrate`
|
89
|
+
|
90
|
+
### Openshift:
|
91
|
+
|
92
|
+
#### Options:
|
93
|
+
|
94
|
+
* **username**: Openshift Username.
|
95
|
+
* **password**: Openshift Password.
|
96
|
+
* **domain**: Openshift Application Domain.
|
97
|
+
* **app**: Openshift Application. Defaults to git repo's name.
|
98
|
+
|
99
|
+
####Examples:
|
100
|
+
|
101
|
+
dpl --provider=openshift --username=<username> --password=<password> --domain=<domain>
|
102
|
+
dpl --provider=openshift --username=<username> --password=<password> --domain=<domain> --app=<app>
|
103
|
+
|
104
|
+
### cloudControl:
|
105
|
+
|
106
|
+
#### Options:
|
107
|
+
|
108
|
+
* **email**: cloudControll email.
|
109
|
+
* **password**: cloudControll password.
|
110
|
+
* **deployment**: cloudControll Deployment. Follows the format "APP_NAME/DEP_NAME".
|
111
|
+
|
112
|
+
#### Examples:
|
113
|
+
|
114
|
+
dpl --provider=cloudcontroll --email=<email> --password<password> --deployment=`APP_NAME/DEP_NAME`
|
115
|
+
|
116
|
+
### RubyGems:
|
117
|
+
|
118
|
+
#### Options:
|
119
|
+
|
120
|
+
* **api-key**: Rubygems Api Key.
|
121
|
+
|
122
|
+
#### Examples:
|
123
|
+
|
124
|
+
dpl --provider=rubygems --api-key=<api-key>
|
125
|
+
|
126
|
+
### PyPI:
|
127
|
+
|
128
|
+
#### Options:
|
129
|
+
|
130
|
+
* **user**: PyPI Username.
|
131
|
+
* **password**: PyPI Password.
|
132
|
+
* **server**: Optional. Only required if you want to release to a different index. Follows the form of "https://mypackageindex.com/index".
|
133
|
+
|
134
|
+
#### Examples:
|
135
|
+
|
136
|
+
dpl --provider=pypi --user=<username> --password=<password>
|
137
|
+
dpl --provider=pypi --user=<username> --password=<password> --server=`https://mypackageindex.com/index`
|
138
|
+
|
139
|
+
### NPM:
|
140
|
+
|
141
|
+
#### Options:
|
142
|
+
|
143
|
+
* **email**: NPM email.
|
144
|
+
* **api-key**: NPM api key. Can be retrieved from your ~/.npmrc file.
|
145
|
+
|
146
|
+
#### Examples:
|
147
|
+
|
148
|
+
dpl --provider=npm --email=<email> --api-key=<api-key>
|
149
|
+
|
150
|
+
### S3:
|
151
|
+
|
152
|
+
#### Options:
|
153
|
+
|
154
|
+
* **access-key-id**: AWS Access Key ID. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
|
155
|
+
* **secret-access-key**: AWS Secret Key. Can be obtained from [here](https://console.aws.amazon.com/iam/home?#security_credential).
|
156
|
+
* **bucket**: S3 Bucket.
|
157
|
+
|
158
|
+
#### Examples:
|
159
|
+
|
160
|
+
dpl --provider=s3 --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket>
|
161
|
+
|
162
|
+
### Appfog:
|
163
|
+
|
164
|
+
#### Options:
|
165
|
+
|
166
|
+
* **email**: Appfog Email.
|
167
|
+
* **password**: Appfog Password.
|
168
|
+
* **app**: Appfog App. Defaults to git repo's name.
|
169
|
+
|
170
|
+
#### Examples:
|
171
|
+
|
172
|
+
dpl --provider=appfog --email=<email> --password=<password>
|
173
|
+
dpl --provider=appfog --email=<email> --password=<password> --app=<app>
|
174
|
+
|
175
|
+
### Divshot.io:
|
176
|
+
|
177
|
+
#### Options:
|
178
|
+
|
179
|
+
* **api-key**: Divshot.io API key
|
180
|
+
* **environment**: Which environment (development, staging, production) to deploy to
|
data/lib/dpl/provider.rb
CHANGED
@@ -17,6 +17,7 @@ module DPL
|
|
17
17
|
autoload :CloudControl, 'dpl/provider/cloudcontrol'
|
18
18
|
autoload :CloudFoundry, 'dpl/provider/cloud_foundry'
|
19
19
|
autoload :PyPI, 'dpl/provider/pypi'
|
20
|
+
autoload :Divshot, 'dpl/provider/divshot'
|
20
21
|
|
21
22
|
def self.new(context, options)
|
22
23
|
return super if self < Provider
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module DPL
|
2
|
+
class Provider
|
3
|
+
class Divshot < Provider
|
4
|
+
npm_g 'divshot-cli', 'divshot'
|
5
|
+
|
6
|
+
def check_auth
|
7
|
+
raise Error, "must supply an api key" unless option(:api_key)
|
8
|
+
end
|
9
|
+
|
10
|
+
def check_app
|
11
|
+
error "missing divshot.json" unless File.exist? "divshot.json"
|
12
|
+
end
|
13
|
+
|
14
|
+
def needs_key?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def push_app
|
19
|
+
context.shell "divshot push #{options[:environment] || "production"} --token #{option(:api_key)}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'dpl/provider/divshot'
|
3
|
+
|
4
|
+
describe DPL::Provider::Divshot do
|
5
|
+
subject :provider do
|
6
|
+
described_class.new DummyContext.new, :api_key => 'abc123'
|
7
|
+
end
|
8
|
+
|
9
|
+
describe :check_auth do
|
10
|
+
it 'should require an api key' do
|
11
|
+
provider.options.update(:api_key => nil)
|
12
|
+
expect{ provider.check_auth }.to raise_error("must supply an api key")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe :push_app do
|
17
|
+
it 'should include the environment specified' do
|
18
|
+
provider.options.update(:environment => 'development')
|
19
|
+
provider.context.should_receive(:shell).with("divshot push development --token abc123")
|
20
|
+
provider.push_app
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should default to production' do
|
24
|
+
provider.context.should_receive(:shell).with("divshot push production --token abc123")
|
25
|
+
provider.push_app
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dpl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.2.travis.
|
4
|
+
version: 1.5.2.travis.218.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- lib/dpl/provider/appfog.rb
|
89
89
|
- lib/dpl/provider/cloud_foundry.rb
|
90
90
|
- lib/dpl/provider/cloudcontrol.rb
|
91
|
+
- lib/dpl/provider/divshot.rb
|
91
92
|
- lib/dpl/provider/dot_cloud.rb
|
92
93
|
- lib/dpl/provider/engine_yard.rb
|
93
94
|
- lib/dpl/provider/heroku.rb
|
@@ -106,6 +107,7 @@ files:
|
|
106
107
|
- spec/cli_spec.rb
|
107
108
|
- spec/provider/appfog_spec.rb
|
108
109
|
- spec/provider/cloudcontrol_spec.rb
|
110
|
+
- spec/provider/divshot_spec.rb
|
109
111
|
- spec/provider/dotcloud_spec.rb
|
110
112
|
- spec/provider/heroku_anvil_spec.rb
|
111
113
|
- spec/provider/heroku_git_spec.rb
|