jenkins-plugin 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jenkins/plugin/version.rb +1 -1
- data/lib/jenkins/rake.rb +14 -8
- metadata +90 -124
data/lib/jenkins/rake.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
require 'jenkins/plugin/version'
|
2
|
+
require 'jenkins/plugin/specification'
|
2
3
|
require 'jenkins/plugin/tools/hpi'
|
3
4
|
require 'jenkins/plugin/tools/loadpath'
|
4
5
|
require 'zip/zip'
|
5
6
|
|
6
7
|
module Jenkins
|
7
8
|
# given the IO handle, produce the basic manifest entries that are common between hpi and hpl formats
|
9
|
+
|
10
|
+
def self.spec
|
11
|
+
@spec ||= Jenkins::Plugin::Specification.load(Dir['*.pluginspec'].first)
|
12
|
+
end
|
13
|
+
|
8
14
|
def self.generate_manifest(f)
|
9
15
|
f.puts "Manifest-Version: 1.0"
|
10
16
|
f.puts "Created-By: #{Jenkins::Plugin::VERSION}"
|
@@ -12,15 +18,15 @@ module Jenkins
|
|
12
18
|
f.puts "Build-Ruby-Version: #{RUBY_VERSION}"
|
13
19
|
|
14
20
|
f.puts "Group-Id: org.jenkins-ci.plugins"
|
15
|
-
f.puts "Short-Name: #{
|
16
|
-
f.puts "Long-Name: #{
|
21
|
+
f.puts "Short-Name: #{Jenkins.spec.name}"
|
22
|
+
f.puts "Long-Name: #{Jenkins.spec.name}" # TODO: better name
|
17
23
|
f.puts "Url: http://jenkins-ci.org/" # TODO: better value
|
18
24
|
# f.puts "Compatible-Since-Version:"
|
19
25
|
f.puts "Plugin-Class: ruby.RubyPlugin"
|
20
|
-
f.puts "Plugin-Version: #{
|
26
|
+
f.puts "Plugin-Version: #{Jenkins.spec.version}"
|
21
27
|
f.puts "Jenkins-Version: 1.426"
|
22
28
|
|
23
|
-
f.puts "Plugin-Dependencies: " +
|
29
|
+
f.puts "Plugin-Dependencies: " + Jenkins.spec.dependencies.map{|k,v| "#{k}:#{v}"}.join(",")
|
24
30
|
# f.puts "Plugin-Developers:"
|
25
31
|
end
|
26
32
|
|
@@ -71,7 +77,7 @@ module Jenkins
|
|
71
77
|
desc "package up stuff into HPI file"
|
72
78
|
task :package => [:verify_constants, target, :bundle] do
|
73
79
|
|
74
|
-
file_name = "#{target}/#{
|
80
|
+
file_name = "#{target}/#{Jenkins.spec.name}.hpi"
|
75
81
|
File.delete file_name if File.exists?(file_name)
|
76
82
|
|
77
83
|
Zip::ZipFile.open(file_name, Zip::ZipFile::CREATE) do |zipfile|
|
@@ -89,7 +95,7 @@ module Jenkins
|
|
89
95
|
end
|
90
96
|
end
|
91
97
|
end
|
92
|
-
puts "#{
|
98
|
+
puts "#{Jenkins.spec.name} plugin #{Jenkins.spec.version} built to #{file_name}"
|
93
99
|
end
|
94
100
|
|
95
101
|
desc "resolve dependency plugins into #{work}/plugins"
|
@@ -97,7 +103,7 @@ module Jenkins
|
|
97
103
|
FileUtils.mkdir_p("#{work}/plugins")
|
98
104
|
|
99
105
|
puts "Copying plugin dependencies into #{work}/plugins"
|
100
|
-
|
106
|
+
Jenkins.spec.dependencies.each do |short_name,version|
|
101
107
|
FileUtils.cp Jenkins::Plugin::Tools::Hpi::resolve(short_name,version), "#{work}/plugins/#{short_name}.hpi", :verbose=>true
|
102
108
|
end
|
103
109
|
end
|
@@ -112,7 +118,7 @@ module Jenkins
|
|
112
118
|
|
113
119
|
# generate the plugin manifest
|
114
120
|
FileUtils.mkdir_p("#{work}/plugins")
|
115
|
-
File.open("#{work}/plugins/#{
|
121
|
+
File.open("#{work}/plugins/#{Jenkins.spec.name}.hpl",mode="w+") do |f|
|
116
122
|
Jenkins.generate_manifest f
|
117
123
|
|
118
124
|
f.puts "Load-Path: #{loadpath.to_a.join(':')}"
|
metadata
CHANGED
@@ -1,16 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jenkins-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 19
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 4
|
10
|
-
version: 0.1.4
|
5
|
+
version: 0.1.5
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
|
-
- Charles Lowell
|
8
|
+
- Charles Lowell
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
@@ -18,116 +13,93 @@ cert_chain: []
|
|
18
13
|
date: 2011-09-16 00:00:00 -05:00
|
19
14
|
default_executable:
|
20
15
|
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
hash: 3
|
89
|
-
segments:
|
90
|
-
- 2
|
91
|
-
- 0
|
92
|
-
version: "2.0"
|
93
|
-
type: :development
|
94
|
-
version_requirements: *id005
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: cucumber
|
97
|
-
prerelease: false
|
98
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
|
-
requirements:
|
101
|
-
- - ~>
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
hash: 15
|
104
|
-
segments:
|
105
|
-
- 1
|
106
|
-
- 0
|
107
|
-
version: "1.0"
|
108
|
-
type: :development
|
109
|
-
version_requirements: *id006
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rubyzip
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0"
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: "0"
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: jenkins-war
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "1.427"
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: bundler
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ~>
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 1.0.0
|
58
|
+
type: :runtime
|
59
|
+
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: rspec
|
62
|
+
prerelease: false
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: "2.0"
|
69
|
+
type: :development
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: cucumber
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: "1.0"
|
80
|
+
type: :development
|
81
|
+
version_requirements: *id006
|
110
82
|
description: I'll think of a better description later, but if you're reading this, then I haven't
|
111
83
|
email:
|
112
|
-
- cowboyd@thefrontside.net
|
84
|
+
- cowboyd@thefrontside.net
|
113
85
|
executables:
|
114
|
-
- jpi
|
86
|
+
- jpi
|
115
87
|
extensions: []
|
116
88
|
|
117
89
|
extra_rdoc_files: []
|
118
90
|
|
119
91
|
files:
|
120
|
-
- .gitignore
|
121
|
-
- Gemfile
|
122
|
-
- README.md
|
123
|
-
- Rakefile
|
124
|
-
- bin/jpi
|
125
|
-
- features/create-new-plugin.feature
|
126
|
-
- jenkins-plugin.gemspec
|
127
|
-
- lib/jenkins/plugin/tools/hpi.rb
|
128
|
-
- lib/jenkins/plugin/tools/loadpath.rb
|
129
|
-
- lib/jenkins/plugin/version.rb
|
130
|
-
- lib/jenkins/rake.rb
|
92
|
+
- .gitignore
|
93
|
+
- Gemfile
|
94
|
+
- README.md
|
95
|
+
- Rakefile
|
96
|
+
- bin/jpi
|
97
|
+
- features/create-new-plugin.feature
|
98
|
+
- jenkins-plugin.gemspec
|
99
|
+
- lib/jenkins/plugin/tools/hpi.rb
|
100
|
+
- lib/jenkins/plugin/tools/loadpath.rb
|
101
|
+
- lib/jenkins/plugin/version.rb
|
102
|
+
- lib/jenkins/rake.rb
|
131
103
|
has_rdoc: true
|
132
104
|
homepage: http://github.com/cowboyd/jenkins-plugin
|
133
105
|
licenses: []
|
@@ -136,31 +108,25 @@ post_install_message:
|
|
136
108
|
rdoc_options: []
|
137
109
|
|
138
110
|
require_paths:
|
139
|
-
- lib
|
111
|
+
- lib
|
140
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
141
113
|
none: false
|
142
114
|
requirements:
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
segments:
|
147
|
-
- 0
|
148
|
-
version: "0"
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: "0"
|
149
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
119
|
none: false
|
151
120
|
requirements:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
segments:
|
156
|
-
- 0
|
157
|
-
version: "0"
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: "0"
|
158
124
|
requirements: []
|
159
125
|
|
160
126
|
rubyforge_project: jenkins-plugin
|
161
|
-
rubygems_version: 1.
|
127
|
+
rubygems_version: 1.5.1
|
162
128
|
signing_key:
|
163
129
|
specification_version: 3
|
164
130
|
summary: Tools for creating and building Jenkins Ruby plugins
|
165
131
|
test_files:
|
166
|
-
- features/create-new-plugin.feature
|
132
|
+
- features/create-new-plugin.feature
|