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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjNlZTZhYzFlZDAxYzBlZTI2MDU3NDQ0MjU4NmJhYjY5NTU4YjY4Zg==
4
+ YWQxODk2N2E5YWRmNGUyZTY5MGZjNmVlYTQ1YTJjNGNiMTIxNjQ3Yw==
5
5
  data.tar.gz: !binary |-
6
- NGM5Y2E2ZmViYjI5YWUyYTZjNDIxZTlhNWM0NGZmOTRjNjFmYzg5NQ==
6
+ Y2M2ZTMyMGNhMDJjMzEwOTdlNDVlNmY1OWVmZGJjYjNkNzY3YjU2Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODQwZjE2MmRlNjc4ZjY3MTdmOTY5YWY5MzM0ZDdmNTgzMmY4NGQ2MmEzNWI5
10
- N2UxZmI3ZjY2OTFiYmM5YjlhODU1YjRjOTkyZTY1YzcwZTkwNGVhODljNTFj
11
- MTM1ODA2NTcxZDFjNTg3MzcxYzUyMzQzYTBlN2VhZmFjZjM4ZWE=
9
+ Mzc4N2E4NGRhMDM1MjJmMzAzNTNmNDAyYTQxYjQ3ZjllYzc4YTYzZWFmN2Y4
10
+ ZWQ0YmYwMDBkNjMxZjU3YTY5YzUxOWVjNzAwYTUxYjViOTU1ZTc1YTEwYTEw
11
+ MWE2OTljN2Y2NDEzODEwZDcwYTQ1OTY5ODJjOWRlZTY0ZDllYzE=
12
12
  data.tar.gz: !binary |-
13
- NzRiYmUzM2M2YzBkYzgwMmQyNmY4N2VhY2I5OTQyMjFkZDUxY2QzZGM0MWE2
14
- YWYyN2FlN2U0NDliZDA4ZTkwZDk4ZTcwNWJkZGI5MjZlYWRjMGNhYmJjMmJl
15
- NDdjZDkyNTU0MjRiYmQzZWJmYjY1YWQ3ZTRiZTYxMjQ1MjZhNTE=
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
@@ -16,6 +16,9 @@ module DPL
16
16
 
17
17
  def push_app
18
18
  context.shell script
19
+ if $?.exitstatus != 0
20
+ raise Error, "Script #{script} failed with status #{$?.exitstatus}"
21
+ end
19
22
  end
20
23
 
21
24
  def script
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.14.travis.853.4
4
+ version: 1.7.14.travis.855.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase