Browse files

Add markdown readme

  • Loading branch information...
1 parent 803c0ca commit 1dd0d850fe1c198664e44ff45765234b3dba76d0 @c9s committed May 22, 2012
Showing with 54 additions and 5 deletions.
  1. +4 −1 Makefile.PL
  2. +47 −0 README.mkdn
  3. +3 −4 lib/Jenkins/Trigger.pm
View
5 Makefile.PL
@@ -2,7 +2,10 @@ use inc::Module::Install;
name 'Jenkins-Trigger';
all_from 'lib/Jenkins/Trigger.pm';
-# requires '';
+requires 'Moose';
+requires 'LWP::UserAgent';
+
+readme_markdown_from_pod 'lib/Jenkins/Trigger.pm';
tests 't/*.t';
# author_tests 'xt';
View
47 README.mkdn
@@ -0,0 +1,47 @@
+# NAME
+
+Jenkins::Trigger - trigger your Jenkins Job!
+
+# SYNOPSIS
+
+ use Jenkins::Trigger;
+ Jenkins::Trigger->new(
+ host => 'build.your-machine.dev',
+ port => 8080,
+ )->trigger( 'JobName' );
+
+# DESCRIPTION
+
+Jenkins::Trigger is a simple tool for triggering projects on Jenkins CI.
+
+You can use this module to hook your projects on Jenkins, and trigger jenkins
+jobs easily.
+
+You can simple write a git hook script:
+
+ #!/usr/bin/env perl
+ use Jenkins::Trigger;
+ Jenkins::Trigger->new( host => 'your.host' )->trigger( 'YourJob' );
+
+# REFERENCE
+
+Jenkins with Git Plugin:
+
+ $ curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>
+
+[https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-Buildsbysourcechanges](https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-Buildsbysourcechanges)
+
+[http://stackoverflow.com/questions/5784329/how-can-i-make-jenkins-ci-with-git-trigger-on-pushes-to-master](http://stackoverflow.com/questions/5784329/how-can-i-make-jenkins-ci-with-git-trigger-on-pushes-to-master)
+
+[http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/](http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/)
+
+# AUTHOR
+
+Yo-An Lin <cornelius.howl {at} gmail.com>
+
+# SEE ALSO
+
+# LICENSE
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
View
7 lib/Jenkins/Trigger.pm
@@ -51,16 +51,15 @@ __END__
=head1 NAME
-Jenkins::Trigger - trig your Jenkins Job!
+Jenkins::Trigger - trigger your Jenkins Job!
=head1 SYNOPSIS
use Jenkins::Trigger;
- my $trigger = Jenkins::Trigger->new(
+ Jenkins::Trigger->new(
host => 'build.your-machine.dev',
port => 8080,
- );
- $trigger->trigger( 'JobName', 'BUILD' );
+ )->trigger( 'JobName' );
=head1 DESCRIPTION

0 comments on commit 1dd0d85

Please sign in to comment.