dpl 1.7.14.travis.853.4 → 1.7.14.travis.855.4
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/README.md +13 -0
- data/lib/dpl/provider/script.rb +3 -0
- data/spec/provider/script_spec.rb +12 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWQxODk2N2E5YWRmNGUyZTY5MGZjNmVlYTQ1YTJjNGNiMTIxNjQ3Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2M2ZTMyMGNhMDJjMzEwOTdlNDVlNmY1OWVmZGJjYjNkNzY3YjU2Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Mzc4N2E4NGRhMDM1MjJmMzAzNTNmNDAyYTQxYjQ3ZjllYzc4YTYzZWFmN2Y4
|
10
|
+
ZWQ0YmYwMDBkNjMxZjU3YTY5YzUxOWVjNzAwYTUxYjViOTU1ZTc1YTEwYTEw
|
11
|
+
MWE2OTljN2Y2NDEzODEwZDcwYTQ1OTY5ODJjOWRlZTY0ZDllYzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGU4YjY5MzIzNWM1OGRiYTE3MjUwOGUzMmQyZTA1ODkxZTAwMGI5ZjU3ZDli
|
14
|
+
MmNmMGYxNGI2ZGUxZWM1MDU4ZDRlYTljOTA5NDQ0ODRjNzdhNzdkYTQ0OGU5
|
15
|
+
ODgyNmVjZGUzM2RiZDM5N2VlZmVhYzMyODE0ODcwZTJiMDM2NjE=
|
data/README.md
CHANGED
@@ -36,6 +36,7 @@ Dpl supports the following providers:
|
|
36
36
|
* [TestFairy](#testfairy)
|
37
37
|
* [ExoScale](#exoscale)
|
38
38
|
* [AWS CodeDeploy](#aws-codedeploy)
|
39
|
+
* [Script](#script)
|
39
40
|
|
40
41
|
## Installation:
|
41
42
|
|
@@ -657,3 +658,15 @@ and your testers can start testing your app.
|
|
657
658
|
#### Examples:
|
658
659
|
|
659
660
|
dpl --provider=codedeploy --access-key-id=<aws access key> --secret_access_key=<aws secret access key> --application=<application name> --deployment_group=<deployment group> --revision_type=<s3/github> --commit_id=<commit ID> --repository=<repo name> --region=<AWS availability zone> --wait-until-deployed=<true>
|
661
|
+
|
662
|
+
### Script:
|
663
|
+
|
664
|
+
An elementary provider that executes a single command.
|
665
|
+
|
666
|
+
#### Option:
|
667
|
+
|
668
|
+
* **script**: script to execute.
|
669
|
+
|
670
|
+
#### Example:
|
671
|
+
|
672
|
+
dpl --provider=script --script=./script/deploy.sh
|
data/lib/dpl/provider/script.rb
CHANGED
@@ -3,14 +3,24 @@ require 'spec_helper'
|
|
3
3
|
describe DPL::Provider::Script do
|
4
4
|
|
5
5
|
subject :provider do
|
6
|
-
described_class.new(DummyContext.new, {})
|
6
|
+
described_class.new(DummyContext.new, { script: script })
|
7
7
|
end
|
8
8
|
|
9
9
|
let(:script) { 'scripts/deploy_script' }
|
10
10
|
|
11
11
|
it 'runs command "script" given' do
|
12
|
-
provider.options.update( script: script )
|
13
12
|
expect(provider.context).to receive(:shell).with(script)
|
14
13
|
provider.push_app
|
15
14
|
end
|
15
|
+
|
16
|
+
context 'when script exits with nonzero status' do
|
17
|
+
before :each do
|
18
|
+
# TODO: Found a better way to test this
|
19
|
+
Process::Status.any_instance.stub(:exitstatus).and_return(1)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'raises error' do
|
23
|
+
expect { provider.push_app }.to raise_error(DPL::Error)
|
24
|
+
end
|
25
|
+
end
|
16
26
|
end
|