jenkins-plugin 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +55 -6
- data/lib/jenkins/plugin/cli.rb +18 -0
- data/lib/jenkins/plugin/tools/manifest.rb +2 -0
- data/lib/jenkins/plugin/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -6,11 +6,60 @@ Provide the facility to create, develop and release extensions for [Jenkins](htt
|
|
6
6
|
|
7
7
|
# Get started
|
8
8
|
|
9
|
-
|
9
|
+
Using JRuby, install the plugin tools
|
10
|
+
|
11
|
+
$ gem install jenkins-plugin
|
12
|
+
|
13
|
+
The gem provides the `jpi` executeable
|
14
|
+
|
15
|
+
$ jpi -h
|
16
|
+
|
17
|
+
jpi- tools to create, build, develop and release Jenkins plugins
|
18
|
+
|
19
|
+
Usage: jpi command [arguments] [options]
|
20
|
+
|
21
|
+
Commands:
|
22
|
+
jpi help [COMMAND] # get help for COMMAND, or for jpi itself
|
23
|
+
jpi new NAME # create a new plugin called NAME
|
24
|
+
jpi generate # generate code for extensions points
|
25
|
+
jpi build # build plugin into .hpi file suitable for distribution
|
26
|
+
jpi server # run a test server with plugin
|
27
|
+
jpi version # show jpi version information
|
28
|
+
|
29
|
+
Once you have a plugin project, you can run a Jenkins test server like so:
|
30
|
+
|
31
|
+
$ jpi server
|
32
|
+
|
33
|
+
Listening for transport dt_socket at address: 8000
|
34
|
+
webroot: System.getProperty("JENKINS_HOME")
|
35
|
+
[Winstone 2011/09/19 12:01:36] - Beginning extraction from war file
|
36
|
+
[Winstone 2011/09/19 12:01:37] - HTTP Listener started: port=8080
|
37
|
+
[Winstone 2011/09/19 12:01:37] - AJP13 Listener started: port=8009
|
38
|
+
[Winstone 2011/09/19 12:01:37] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
|
39
|
+
Sep 19, 2011 12:01:37 PM jenkins.model.Jenkins$6 onAttained
|
40
|
+
INFO: Started initialization
|
41
|
+
Sep 19, 2011 12:01:38 PM hudson.PluginManager$1$3$1 isDuplicate
|
42
|
+
Sep 19, 2011 12:01:39 PM jenkins.model.Jenkins$6 onAttained
|
43
|
+
INFO: Listed all plugins
|
44
|
+
Sep 19, 2011 12:01:39 PM ruby.RubyRuntimePlugin start
|
45
|
+
INFO: Injecting JRuby into XStream
|
46
|
+
Loading models/builder.rb
|
47
|
+
Loading logging_wrapper.rb
|
48
|
+
Loading root_action.rb
|
49
|
+
Sep 19, 2011 12:01:49 PM jenkins.model.Jenkins$6 onAttained
|
50
|
+
INFO: Prepared all plugins
|
51
|
+
Sep 19, 2011 12:01:49 PM jenkins.model.Jenkins$6 onAttained
|
52
|
+
INFO: Started all plugins
|
53
|
+
Sep 19, 2011 12:01:49 PM jenkins.model.Jenkins$6 onAttained
|
54
|
+
INFO: Augmented all extensions
|
55
|
+
Sep 19, 2011 12:01:49 PM jenkins.model.Jenkins$6 onAttained
|
56
|
+
INFO: Loaded all jobs
|
57
|
+
Sep 19, 2011 12:01:51 PM jenkins.model.Jenkins$6 onAttained
|
58
|
+
INFO: Completed initialization
|
59
|
+
Sep 19, 2011 12:01:51 PM hudson.TcpSlaveAgentListener <init>
|
60
|
+
INFO: JNLP slave agent listener started on TCP port 52262
|
61
|
+
Sep 19, 2011 12:02:01 PM hudson.WebAppMain$2 run
|
62
|
+
INFO: Jenkins is fully up and running
|
63
|
+
|
10
64
|
|
11
|
-
$ gem install jenkins-plugins
|
12
|
-
$ jpi create my-awesome-jenkins-plugin
|
13
|
-
$ cd my-awesome-jenkins-plugin
|
14
|
-
$ jpi gen build_wrapper MyBuildWrapper
|
15
|
-
$ rake server
|
16
65
|
|
data/lib/jenkins/plugin/cli.rb
CHANGED
@@ -9,6 +9,23 @@ module Jenkins
|
|
9
9
|
class CLI < Thor
|
10
10
|
extend Formatting
|
11
11
|
|
12
|
+
desc "new NAME", "create a new plugin called NAME"
|
13
|
+
def new(name)
|
14
|
+
shell.say "TODO: new(#{name})"
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "generate", "generate code for extensions points"
|
18
|
+
def generate
|
19
|
+
shell.say "TODO: generate()"
|
20
|
+
end
|
21
|
+
map "g" => "generate"
|
22
|
+
|
23
|
+
|
24
|
+
desc "build", "build plugin into .hpi file suitable for distribution"
|
25
|
+
def build
|
26
|
+
shell.say "TODO: build()"
|
27
|
+
end
|
28
|
+
|
12
29
|
desc "server", "run a test server with plugin"
|
13
30
|
method_option :home, :desc => "set server work directory", :default => 'work'
|
14
31
|
method_option :port, :desc => "server http port (currently ignored)", :default => 8080
|
@@ -17,6 +34,7 @@ module Jenkins
|
|
17
34
|
server = Jenkins::Plugin::Tools::Server.new(spec, options[:home])
|
18
35
|
server.run!
|
19
36
|
end
|
37
|
+
map "s" => "server"
|
20
38
|
|
21
39
|
desc "version", "show jpi version information"
|
22
40
|
def version
|