capistrano-scm-jenkins 0.4.0 → 0.5.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/NEWS.md +6 -0
- data/lib/capistrano-scm-jenkins/version.rb +1 -1
- data/lib/capistrano/jenkins.rb +11 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3eddcc06310bc70b74ca2571546e19e4d24d62f
|
4
|
+
data.tar.gz: 990e07c5aad6d6b388baedb8e36959eee74e76ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fed3f286ee7b3153431081cc024b17333491f7f8cd7ede7e1ade0d4b872d2f94d2b77df61283b2b905754667e4695386fa0112bfa3dbbea40f8c627b118cbf9
|
7
|
+
data.tar.gz: 80757c0847d24f6406afafb2310d9d54f0851ff093a93fa2cfea0150118fab06024a66c88bd4530fceb0eeec354a48e98252e4e52f4eb0a463039228857c5282
|
data/Gemfile.lock
CHANGED
data/NEWS.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.5.0 (2014-11-11)
|
2
|
+
|
3
|
+
* Clean up some Ruby code, thanks to RuboCop
|
4
|
+
* Provide a mechanism, using `:deployed_artifact_filename`, to control the name of the deployed artifact’s filename
|
5
|
+
- Ties in nicely with [`capistrano-jetty`](https://github.com/evertrue/capistrano-jetty) & [`capistrano-storm`](https://github.com/evertrue/capistrano-storm)
|
6
|
+
|
1
7
|
## 0.4.0 (2014-10-29)
|
2
8
|
|
3
9
|
* Change default for `:jenkins_artifact_file` to `*zip*/archive.zip` (h/t @lostintime on #22)
|
data/lib/capistrano/jenkins.rb
CHANGED
@@ -64,11 +64,11 @@ class Capistrano::Jenkins < Capistrano::SCM
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def artifact_is_zip?
|
67
|
-
artifact_ext ==
|
67
|
+
artifact_ext == '.zip'
|
68
68
|
end
|
69
69
|
|
70
70
|
def artifact_file_opt
|
71
|
-
fetch(:jenkins_artifact_file,
|
71
|
+
fetch(:jenkins_artifact_file, '*zip*/archive.zip')
|
72
72
|
end
|
73
73
|
|
74
74
|
def artifact_filename
|
@@ -113,7 +113,7 @@ class Capistrano::Jenkins < Capistrano::SCM
|
|
113
113
|
|
114
114
|
if allowed_statuses.include? build_status
|
115
115
|
if artifact_is_zip?
|
116
|
-
unless test!
|
116
|
+
unless test! 'hash unzip 2>/dev/null'
|
117
117
|
abort 'unzip required, but not found'
|
118
118
|
end
|
119
119
|
end
|
@@ -133,22 +133,20 @@ class Capistrano::Jenkins < Capistrano::SCM
|
|
133
133
|
|
134
134
|
def update
|
135
135
|
# grab the newest artifact
|
136
|
-
context.execute :curl, "--silent --fail --show-error #{curl_auth} "
|
137
|
-
"#{artifact_url} -o #{fetch(:
|
138
|
-
"#{
|
136
|
+
context.execute :curl, "--silent --fail --show-error #{curl_auth} " \
|
137
|
+
"#{artifact_url} -o #{fetch(:deployed_artifact_filename, artifact_filename)} " \
|
138
|
+
"#{'--insecure' if fetch(:jenkins_insecure)}"
|
139
139
|
end
|
140
140
|
|
141
141
|
def release
|
142
|
-
downloaded_artifact = "#{fetch(:application)}#{artifact_ext}"
|
143
|
-
|
144
142
|
if artifact_is_zip?
|
145
143
|
# is an archive - unpack and deploy
|
146
|
-
context.execute :rm,
|
147
|
-
context.execute :unzip,
|
148
|
-
context.execute :mv, "out/#{fetch(:jenkins_artifact_path,
|
149
|
-
context.execute :rm,
|
144
|
+
context.execute :rm, '-rf', 'out'
|
145
|
+
context.execute :unzip, fetch(:deployed_artifact_filename, artifact_filename), '-d', 'out/'
|
146
|
+
context.execute :mv, "out/#{fetch(:jenkins_artifact_path, '*')}", release_path
|
147
|
+
context.execute :rm, '-rf', 'out'
|
150
148
|
else
|
151
|
-
context.execute :cp,
|
149
|
+
context.execute :cp, fetch(:deployed_artifact_filename, artifact_filename), release_path
|
152
150
|
end
|
153
151
|
end
|
154
152
|
|
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.5.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-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|