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 +4 -4
- data/.editorconfig +19 -0
- data/Gemfile.lock +4 -4
- data/NEWS.md +5 -0
- data/README.md +3 -0
- data/lib/capistrano-scm-jenkins/version.rb +1 -1
- data/lib/capistrano/jenkins.rb +12 -2
- data/lib/capistrano/tasks/jenkins.rake +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3b243848ad43f89d85eb350058ec7dff220b433
|
4
|
+
data.tar.gz: 00e02e2f983b2e6a3dfe80369ee558922f8c543b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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.
|
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
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
|
#
|
data/lib/capistrano/jenkins.rb
CHANGED
@@ -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
|
111
|
+
if allowed_statuses.include? build_status
|
102
112
|
true
|
103
113
|
else
|
104
|
-
abort 'Latest build status isn
|
114
|
+
abort 'Latest build status isn\'t green!'
|
105
115
|
end
|
106
116
|
end
|
107
117
|
|
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.
|
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-
|
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"
|