dpl 1.8.20.travis.1655.3 → 1.8.20.travis.1665.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/dpl/provider/azure_webapps.rb +2 -2
- data/spec/provider/azure_webapps_spec.rb +95 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODdiMzYxMTEzYTBkYTg5N2YzY2I4NDJjOGMwMDE5MjA5YzFjMjU4NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTgyZWUxOGI0M2FjMjExY2NhMmNiZTlkMDVkYmNhNjFiMDgxNTdkNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGRkZGIxZmMxNGU3YWVlMjEyNDEzMmMwMTc2MzBjMTI4NjkyMTIyNTY0ODQx
|
10
|
+
NGU5OGRlZDdiYjRhMGJmZDc3MWQxMmM1Njk3OTk5NWY1Yjk2ZTBiODk4MTIw
|
11
|
+
MmNkMGE3NGRiYzlkN2RlOTI5NWVkMjVlZGQ2NmQ1Njc2YWE2NGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzljN2ZjYTQyYTQyNTEyYjA0ZDhhNWZhMDlkYTQ3MmNhNDRlZGQ4NWM2MjUw
|
14
|
+
MWEwZDFkODAyODZiODczYmYzYmZkMjljN2UwMTMyZmVhZGY1YTIxZjM2NzIx
|
15
|
+
N2ViYWYyY2U1MDgxY2U3ZjY2YzVkNGM0YzQ3NWNkYWZmNWQyZmE=
|
@@ -38,9 +38,9 @@ module DPL
|
|
38
38
|
end
|
39
39
|
|
40
40
|
if !!options[:verbose]
|
41
|
-
context.shell "git push --force --quiet #{git_target} HEAD:master"
|
41
|
+
context.shell "git push --force --quiet #{git_target} HEAD:refs/heads/master"
|
42
42
|
else
|
43
|
-
context.shell "git push --force --quiet #{git_target} HEAD:master > /dev/null 2>&1"
|
43
|
+
context.shell "git push --force --quiet #{git_target} HEAD:refs/heads/master > /dev/null 2>&1"
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'dpl/provider/anynines'
|
3
|
+
|
4
|
+
|
5
|
+
describe DPL::Provider::AzureWebApps do
|
6
|
+
subject :provider do
|
7
|
+
described_class.new(DummyContext.new,
|
8
|
+
:username => 'myUsername',
|
9
|
+
:password => 'myPassword',
|
10
|
+
:site => 'myWebsite',
|
11
|
+
:slot => 'mySlot')
|
12
|
+
end
|
13
|
+
|
14
|
+
subject :provider_without_slot do
|
15
|
+
described_class.new(DummyContext.new,
|
16
|
+
:username => 'myUsername',
|
17
|
+
:password => 'myPassword',
|
18
|
+
:site => 'myWebsite')
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
describe "#git_target" do
|
23
|
+
example "With slot" do
|
24
|
+
expect(provider.git_target).to eq('https://myUsername:myPassword@mySlot.scm.azurewebsites.net:443/myWebsite.git')
|
25
|
+
end
|
26
|
+
|
27
|
+
example "Without slot" do
|
28
|
+
expect(provider_without_slot.git_target).to eq('https://myUsername:myPassword@myWebsite.scm.azurewebsites.net:443/myWebsite.git')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#needs_key?" do
|
33
|
+
example do
|
34
|
+
expect(provider.needs_key?).to eq(false)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "#check_auth" do
|
39
|
+
example "Without credentials" do
|
40
|
+
provider.options.update(:username => nil)
|
41
|
+
provider.options.update(:password => nil)
|
42
|
+
provider.options.update(:site => nil)
|
43
|
+
expect{provider.check_auth}.to raise_error(DPL::Error, 'missing Azure Git Deployment username')
|
44
|
+
end
|
45
|
+
|
46
|
+
example "Without username" do
|
47
|
+
provider.options.update(:username => nil)
|
48
|
+
expect{provider.check_auth}.to raise_error(DPL::Error, 'missing Azure Git Deployment username')
|
49
|
+
end
|
50
|
+
|
51
|
+
example "Without password" do
|
52
|
+
provider.options.update(:password => nil)
|
53
|
+
expect{provider.check_auth}.to raise_error(DPL::Error, 'missing Azure Git Deployment password')
|
54
|
+
end
|
55
|
+
|
56
|
+
example "Without WebApp name" do
|
57
|
+
provider.options.update(:site => nil)
|
58
|
+
expect{provider.check_auth}.to raise_error(DPL::Error, 'missing Azure Web App name')
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "push_app" do
|
63
|
+
example "skip cleanup" do
|
64
|
+
provider.options.update(:skip_cleanup => true)
|
65
|
+
provider.options.update(:verbose => false)
|
66
|
+
expect(provider.context).to receive(:shell).with('git checkout HEAD')
|
67
|
+
expect(provider.context).to receive(:shell).with('git add . --all --force')
|
68
|
+
expect(provider.context).to receive(:shell).with('git commit -m "Skip Cleanup Commit"')
|
69
|
+
expect(provider.context).to receive(:shell).with('git push --force --quiet https://myUsername:myPassword@mySlot.scm.azurewebsites.net:443/myWebsite.git HEAD:refs/heads/master > /dev/null 2>&1')
|
70
|
+
provider.push_app
|
71
|
+
end
|
72
|
+
|
73
|
+
example "Dont skip cleanup" do
|
74
|
+
provider.options.update(:skip_cleanup => false)
|
75
|
+
provider.options.update(:verbose => false)
|
76
|
+
expect(provider.context).to receive(:shell).with('git push --force --quiet https://myUsername:myPassword@mySlot.scm.azurewebsites.net:443/myWebsite.git HEAD:refs/heads/master > /dev/null 2>&1')
|
77
|
+
provider.push_app
|
78
|
+
end
|
79
|
+
|
80
|
+
example "Verbose" do
|
81
|
+
provider.options.update(:skip_cleanup => false)
|
82
|
+
provider.options.update(:verbose => true)
|
83
|
+
expect(provider.context).to receive(:shell).with('git push --force --quiet https://myUsername:myPassword@mySlot.scm.azurewebsites.net:443/myWebsite.git HEAD:refs/heads/master')
|
84
|
+
provider.push_app
|
85
|
+
end
|
86
|
+
|
87
|
+
example "Not verbose" do
|
88
|
+
provider.options.update(:skip_cleanup => false)
|
89
|
+
provider.options.update(:verbose => false)
|
90
|
+
expect(provider.context).to receive(:shell).with('git push --force --quiet https://myUsername:myPassword@mySlot.scm.azurewebsites.net:443/myWebsite.git HEAD:refs/heads/master > /dev/null 2>&1')
|
91
|
+
provider.push_app
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
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.8.20.travis.
|
4
|
+
version: 1.8.20.travis.1665.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- spec/provider/anynines_spec.rb
|
176
176
|
- spec/provider/appfog_spec.rb
|
177
177
|
- spec/provider/atlas_spec.rb
|
178
|
+
- spec/provider/azure_webapps_spec.rb
|
178
179
|
- spec/provider/bintray_spec.rb
|
179
180
|
- spec/provider/bitballoon_spec.rb
|
180
181
|
- spec/provider/boxfuse_spec.rb
|