capistrano-scm-jenkins 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9d496f715b9d4a38d5c1fe98dcf8dbc966084be
4
- data.tar.gz: edcba1aeb92ad730ac7cabbb7ae284841ff0fe5e
3
+ metadata.gz: d3b243848ad43f89d85eb350058ec7dff220b433
4
+ data.tar.gz: 00e02e2f983b2e6a3dfe80369ee558922f8c543b
5
5
  SHA512:
6
- metadata.gz: 91dbf110bb7d2ff0ab8357e0d0f3a5f29693f57630d4b5d9181d49d4f3e37dd30ed95b5422f38c65c7a6a4f9235f01726d482b78b4bec1ba8f99b39b27d5617f
7
- data.tar.gz: f1a9e7ba9c056e2d74a2d4bef57e3ec16238df92b54ee908d23b5f65275e2dcab1794f58e32b724c6d901a729b2e99ab568512f382527fad21743810d826dd1b
6
+ metadata.gz: 53ba4136526ac30051d325bd4cb56a39eb4aaac31637a24c21ba5bece0bcb79db4792ecfdbb867d6deb8adabb648b5cf46e1467eba69482d04891b5e4c23d1a7
7
+ data.tar.gz: fc77d052a69ec42aeb54486b24c90680543ca578e554946977df11df5cbb3e812b4bba3cfc730bc625d69fb3397566c08866ed6377778f2360e2cee7147b5040
data/.editorconfig ADDED
@@ -0,0 +1,19 @@
1
+ ; EditorConfig is awesome: http://EditorConfig.org
2
+
3
+ root = true
4
+
5
+ ; UTF-8 charset
6
+ ; Unix-style newlines with a newline ending every file
7
+ ; 2 space indent
8
+ ; Trim trailing whitespace
9
+ [*]
10
+ indent_style = space
11
+ indent_size = 2
12
+ end_of_line = lf
13
+ charset = utf-8
14
+ trim_trailing_whitespace = true
15
+ insert_final_newline = true
16
+
17
+ [*.md]
18
+ indent_size = 4
19
+ trim_trailing_whitespace = false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-scm-jenkins (0.1.0)
4
+ capistrano-scm-jenkins (0.2.0)
5
5
  capistrano (~> 3.1)
6
6
 
7
7
  GEM
@@ -13,7 +13,7 @@ GEM
13
13
  sshkit (~> 1.3)
14
14
  diff-lcs (1.2.5)
15
15
  i18n (0.6.9)
16
- metaclass (0.0.2)
16
+ metaclass (0.0.4)
17
17
  mocha (1.0.0)
18
18
  metaclass (~> 0.0.1)
19
19
  net-scp (1.1.2)
@@ -24,10 +24,10 @@ GEM
24
24
  rspec-core (~> 2.14.0)
25
25
  rspec-expectations (~> 2.14.0)
26
26
  rspec-mocks (~> 2.14.0)
27
- rspec-core (2.14.7)
27
+ rspec-core (2.14.8)
28
28
  rspec-expectations (2.14.5)
29
29
  diff-lcs (>= 1.1.3, < 2.0)
30
- rspec-mocks (2.14.5)
30
+ rspec-mocks (2.14.6)
31
31
  sshkit (1.3.0)
32
32
  net-scp (>= 1.1.2)
33
33
  net-ssh
data/NEWS.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.2.0 (2014-03-06)
2
+
3
+ * Allow unstable, but successful, builds to deploy
4
+ * Tweak "no green builds" message to not use higher-byte character
5
+
1
6
  ## 0.1.0 (2014-02-11)
2
7
 
3
8
  * Initial version for Capistrano 3
data/README.md CHANGED
@@ -39,6 +39,9 @@ set :deploy_to, "/home/#{fetch(:user)}/#{fetch(:application)}"
39
39
  set :jenkins_user, 'user'
40
40
  set :jenkins_pass, 'pass'
41
41
 
42
+ # Allow the deployment of unstable versions
43
+ # set :jenkins_use_unstable, true
44
+
42
45
  # Deploy from artifact subfolder. (ex: mv zipout/#{:jenkins_artifact_path} #{destination})
43
46
  # set :jenkins_artifact_path, 'archive'
44
47
  #
@@ -1,3 +1,3 @@
1
1
  module CapistranoScmJenkins
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -29,6 +29,16 @@ class Capistrano::Jenkins < Capistrano::SCM
29
29
  end
30
30
  end
31
31
 
32
+ def allowed_statuses
33
+ statuses = %w(success)
34
+
35
+ @allowed_statuses ||= begin
36
+ statuses << 'unstable' if fetch(:jenkins_use_unstable)
37
+
38
+ statuses
39
+ end
40
+ end
41
+
32
42
  def ssl_opts
33
43
  if fetch(:jenkins_insecure)
34
44
  { ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE }
@@ -98,10 +108,10 @@ class Capistrano::Jenkins < Capistrano::SCM
98
108
 
99
109
  set :current_revision, "build #{last_build_number}"
100
110
 
101
- if build_status == 'success'
111
+ if allowed_statuses.include? build_status
102
112
  true
103
113
  else
104
- abort 'Latest build status isnt green!'
114
+ abort 'Latest build status isn\'t green!'
105
115
  end
106
116
  end
107
117
 
@@ -20,7 +20,7 @@ namespace :jenkins do
20
20
  info t(:mirror_exists, at: repo_path)
21
21
  else
22
22
  within deploy_path do
23
- debug "Were not cloning anything, just creating #{repo_path}"
23
+ debug "We're not cloning anything, just creating #{repo_path}"
24
24
  strategy.clone
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-scm-jenkins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LI Daobing
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-13 00:00:00.000000000 Z
12
+ date: 2014-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -89,6 +89,7 @@ executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
+ - ".editorconfig"
92
93
  - ".gitignore"
93
94
  - ".rspec"
94
95
  - ".travis.yml"