dpl 1.6.1.travis.452.1 → 1.6.1.travis.453.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/dpl/provider/openshift.rb +9 -5
- data/spec/provider/openshift_spec.rb +9 -8
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YzU4NDk4NDY1MWEwODE4MWE0NWZkZTVjNzNiODFmODUzMmI3OTJmOQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
Nzg1NzIxOTc5NDAxMGIyMTZlMGQ5MzQ5NmQ2ZTQ0ZDhlMzA5YmE4ZQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZjE0YWM0OTUzNDNiYjFmMDg0NzM4MjE3ZDQzMzUzNjkxZTk3NDNjZjllZmI4
|
|
10
|
+
YzdjOGZlMTY2NzFhNmJiMWYyYTA3OGJkMjExMTVlNDVmODU4NmY1NzM5MmUz
|
|
11
|
+
NmUxMTk0ZjNkZDJlYWFiMjcwN2FmMjIyZmFhY2QwMGJlNzhjYTE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YzZhZGI0ZDdjZGEzNzg1NWJhMDMxZjBlOWRiZGViZjVkZTM4ZDY2N2YwNDM5
|
|
14
|
+
YzIxNGIyY2RmMDI1NGIxYmVlMTI3NWRkNjYzNTg0YTE2ZGYxYzgxOGExMjdl
|
|
15
|
+
YzJmMzBmODNiNzgxZTE3ZGQxNzU0NWQxMjUxMGQ1YjRkNWIyNzA=
|
|
@@ -3,6 +3,10 @@ module DPL
|
|
|
3
3
|
class Openshift < Provider
|
|
4
4
|
requires 'rhc'
|
|
5
5
|
|
|
6
|
+
def initialize(context, options)
|
|
7
|
+
super
|
|
8
|
+
@deployment_branch = option(:deployment_branch)
|
|
9
|
+
end
|
|
6
10
|
def api
|
|
7
11
|
@api ||= ::RHC::Rest::Client.new(:user => option(:user), :password => option(:password), :server => 'openshift.redhat.com')
|
|
8
12
|
end
|
|
@@ -33,12 +37,12 @@ module DPL
|
|
|
33
37
|
end
|
|
34
38
|
|
|
35
39
|
def push_app
|
|
36
|
-
if
|
|
37
|
-
log "deployment_branch detected: #{
|
|
38
|
-
|
|
39
|
-
context.shell "git push
|
|
40
|
+
if @deployment_branch
|
|
41
|
+
log "deployment_branch detected: #{@deployment_branch}"
|
|
42
|
+
app.deployment_branch = @deployment_branch
|
|
43
|
+
context.shell "git push #{app.git_url} -f #{app.deployment_branch}"
|
|
40
44
|
else
|
|
41
|
-
context.shell "git push
|
|
45
|
+
context.shell "git push #{app.git_url} -f"
|
|
42
46
|
end
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -4,7 +4,7 @@ require 'dpl/provider/openshift'
|
|
|
4
4
|
|
|
5
5
|
describe DPL::Provider::Openshift do
|
|
6
6
|
subject :provider do
|
|
7
|
-
described_class.new(DummyContext.new, :user => 'foo', :password => 'foo', :domain => 'foo', :app => 'example', :key_name => 'key')
|
|
7
|
+
described_class.new(DummyContext.new, :user => 'foo', :password => 'foo', :domain => 'foo', :app => 'example', :key_name => 'key', :deployment_branch => nil)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
describe "#api" do
|
|
@@ -66,17 +66,18 @@ describe DPL::Provider::Openshift do
|
|
|
66
66
|
|
|
67
67
|
describe "#push_app" do
|
|
68
68
|
example "when app.deployment_branch is not set" do
|
|
69
|
-
expect(provider.
|
|
70
|
-
expect(provider.context).to receive(:shell).with("git push --verbose git://something -f")
|
|
69
|
+
expect(provider.context).to receive(:shell).with("git push git://something -f")
|
|
71
70
|
provider.push_app
|
|
72
71
|
end
|
|
72
|
+
end
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
context "when app.deployment_branch is set" do
|
|
75
|
+
subject :provider do
|
|
76
|
+
described_class.new(DummyContext.new, :user => 'foo', :password => 'foo', :domain => 'foo', :app => 'example', :key_name => 'key', :deployment_branch => 'test-branch')
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
expect(provider.app).to receive(:deployment_branch=).with("test-branch")
|
|
79
|
+
expect(provider.context).to receive(:shell).with("git push git://something -f test-branch")
|
|
80
|
+
provider.push_app
|
|
80
81
|
end
|
|
81
82
|
end
|
|
82
83
|
|
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.6.1.travis.
|
|
4
|
+
version: 1.6.1.travis.453.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Konstantin Haase
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-06-
|
|
11
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|