2011-01-22 21:33:11 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Jenkins < Formula
|
2011-01-22 21:33:11 +00:00
|
|
|
homepage 'http://jenkins-ci.org'
|
2014-04-14 14:58:55 +00:00
|
|
|
url 'http://mirrors.jenkins-ci.org/war/1.559/jenkins.war'
|
|
|
|
sha1 '1b9758b976be9510948d5a058324d76b6d6459f4'
|
2013-04-03 14:40:53 +00:00
|
|
|
|
2012-02-14 05:52:14 +00:00
|
|
|
head 'https://github.com/jenkinsci/jenkins.git'
|
2011-01-22 21:33:11 +00:00
|
|
|
|
|
|
|
def install
|
2012-09-03 21:07:27 +00:00
|
|
|
if build.head?
|
2012-06-17 22:54:29 +00:00
|
|
|
system "mvn clean install -pl war -am -DskipTests"
|
2012-09-08 19:19:08 +00:00
|
|
|
libexec.install 'war/target/jenkins.war', '.'
|
|
|
|
else
|
|
|
|
libexec.install "jenkins.war"
|
2012-06-17 22:54:29 +00:00
|
|
|
end
|
2011-01-22 21:33:11 +00:00
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => "java -jar #{HOMEBREW_PREFIX}/opt/jenkins/libexec/jenkins.war"
|
2011-01-22 21:33:11 +00:00
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>/usr/bin/java</string>
|
2013-10-05 07:35:53 +00:00
|
|
|
<string>-Dmail.smtp.starttls.enable=true</string>
|
2012-11-25 15:06:41 +00:00
|
|
|
<string>-jar</string>
|
2014-03-06 05:28:31 +00:00
|
|
|
<string>#{opt_libexec}/jenkins.war</string>
|
2012-11-25 15:06:41 +00:00
|
|
|
<string>--httpListenAddress=127.0.0.1</string>
|
2013-11-14 22:58:38 +00:00
|
|
|
<string>--httpPort=8080</string>
|
2012-11-25 15:06:41 +00:00
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
2011-01-22 21:33:11 +00:00
|
|
|
end
|
2013-11-14 22:58:38 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Note: When using launchctl the port will be 8080.
|
|
|
|
EOS
|
|
|
|
end
|
2011-01-22 21:33:11 +00:00
|
|
|
end
|