Jenkins on MacOS

259 views
Skip to first unread message

Erik Ramfelt

unread,
Mar 18, 2011, 5:55:40 AM3/18/11
to jenkins...@googlegroups.com
Has anyone create any installation package for Jenkins on Macos? Or have any experience on running it on Macos? 

regards
//Erik

danny staple

unread,
Mar 18, 2011, 6:13:12 AM3/18/11
to jenkins...@googlegroups.com
In one of my setups, I have a Jenkins master running on an OSX box. Download the war file, start with java -jar jenkins.war, and you have a running jenkins master.

Erik Ramfelt

unread,
Mar 18, 2011, 8:53:11 AM3/18/11
to jenkins...@googlegroups.com
I was thinking of something more of a proper installation that would start upon boot, etc; just like the debian/ubuntu packages or even the Windows installer that is built into Jenkins.

//Erik

James Moore

unread,
Mar 18, 2011, 1:23:44 PM3/18/11
to jenkins...@googlegroups.com, Erik Ramfelt
Hi Erik, we’re using a single Mac OS Jenkins install. I have it launching on boot using the following file named jerkins.ci.plist. Just install it in /Library/LaunchAgents. I believe it needs to be owned by root. Change the username and path to suit your install. If you need to restart Jenkins just kill the java process and it’ll respawn automatically.

==============
<?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>Jenkins</string>
 <key>UserName</key>
 <string>buildbot</string>
 <key>GroupName</key>
 <string>staff</string>
 <key>ProgramArguments</key>
 <array>
 <string>/usr/bin/java</string>
 <string>-Xmx512m</string>
 <string>-jar</string>
 <string>/Users/buildbot/Jenkins/jenkins.war</string>
 </array>
 <key>RunAtLoad</key>
 <true/>
 <key>KeepAlive</key>
 <true/>
 <key>EnvironmentVariables</key>
   <dict>
     <key>JENKINS_HOME</key>
     <string>/Users/buildbot/Jenkins/Home</string>
   </dict>
</dict>
</plist>
==============

James

Russ Tremain

unread,
Mar 18, 2011, 1:41:40 PM3/18/11
to Erik Ramfelt, jenkins...@googlegroups.com
we run our build farm on mac osx 10.6.x under tomcat.
however, I have problems with jenkins starting up at boot time.
(This is a well-documented problem on the mac when trying to run headless.)

solution is to login and start it up under the proper user id.

configuration files appended.

-Russ

==> StartupItems/Tomcat/StartupParameters.plist <==
{
    Description     = "Tomcat servlet engine";
      Provides        = ("Servlet Engine");
   Requires        = ("DirectoryServices");
        Uses            = ("Disks");
    OrderPreference = "Last";
}

==> StartupItems/Tomcat/Tomcat <==
#!/bin/sh
##
# Tomcat Servlet Engine
# NOTE on plist:
# OrderPreference" specifies the general time period in which a StartupItem will be executed.
# The possible values are: First, Early, None (default), Late, Last
##

. /etc/rc.common

StartService ()
{
    ConsoleMessage "Starting Tomcat, CATALINA_HOME=$CATALINA_HOME HUDSON_HOME=$HUDSON_HOME"
    $CATALINA_HOME/bin/catalina.sh start
}

StopService ()
{
    ConsoleMessage "Stopping Tomcat, CATALINA_HOME=$CATALINA_HOME HUDSON_HOME=$HUDSON_HOME"
    $CATALINA_HOME/bin/catalina.sh stop
}

RestartService ()
{
    ConsoleMessage "Restarting Tomcat, CATALINA_HOME=$CATALINA_HOME HUDSON_HOME=$HUDSON_HOME"
    $CATALINA_HOME/bin/catalina.sh stop
    $CATALINA_HOME/bin/catalina.sh start
}

#########
#exported vars
set -a
HOME=/Users/tomcat
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
JAVA_OPTS=-Xmx1024m

#CATALINA_OPTS="-Djava.awt.headless=true"
CATALINA_HOME=$HOME/proj/vqwiki/tomcat
CATALINA_BASE=$HOME/proj/vqwiki/tomcat
HUDSON_HOME=$HOME/.hudson
set +a
#########
RunService "$1"


% alias installstartup
(cd /Library/StartupItems; sudo rm -rf Tomcat; sudo cp -rp $PROJECT/StartupItems/Tomcat .; sudo chown -R root:wheel Tomcat)

Kamal Ahmed

unread,
Mar 18, 2011, 2:10:27 PM3/18/11
to jenkins...@googlegroups.com
I have setup Jenkins 1.401, but not getting email notifications.

jenkins.log

Sending e-mails to: xxx...@xxx.com
ERROR: Invalid Addresses
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 553 5.1.8 <xxx...@xxx.com>... Domain of sender address nobody@nowhere does not exist

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at javax.mail.Transport.send0(Transport.java:169)

How do i fix this ?

Manuel Doninger

unread,
Mar 18, 2011, 2:18:05 PM3/18/11
to jenkins...@googlegroups.com, Kamal Ahmed
Your SMTP server requires authentication. So as sender address type a
valid e-mail-address and provide the username and password for this
mail address.

Manuel

Kamal Ahmed

unread,
Mar 18, 2011, 2:35:02 PM3/18/11
to jenkins...@googlegroups.com
The only place i actually see username and password is Google Calander plugin, otherwise there does not seem ot be any place for a username/password in the UI.

Do i need to enter the username and password in some configuration file ? if so which one?

Thanks,
-Kamal.

Manuel Doninger

unread,
Mar 18, 2011, 3:24:31 PM3/18/11
to jenkins...@googlegroups.com
In the global Jenkins configuration at the section E-Mail notification
click the button "Advanced" (i only have the german version of
jenkins, so i don't know the exact button texts in english). There you
can configure the SMTP authentication.

Manuel

Kamal Ahmed

unread,
Mar 18, 2011, 4:46:51 PM3/18/11
to jenkins...@googlegroups.com
ok this is resolved , and here is how.

This had actually nothing to do with Jenkins.

My SMTP MTA/MUA (User Agent and TransferAgent) were PostFix/Mutt

When installing postfix via apt-get install postfix, i used the internal domain name Server.blah.net
and had a smart replay, with Smart-rerlay.blah.net, but the Exchange server is on company.com, Which is a totally different domain.
so when postfix send it to the relay, the relay does not forward it, rejecting it, since:
1. It either needs username and password authentication, since the mai is coming rom a diffeent domain
2. The "FROM" shoud be of the form company.com

so if i just setup postfix mail as being coming from server.company.com, all things should work.
and i did get an email using mutt on command line.

Theoratically the mail from Jenkins should also work.

I will look into the advanced button also.

yes, i tried the advanced SMTP settings, and now getting email's . It actually turned out that we have a mail replay which does not require suthentication.

Thanks,
-Kamal.

Sami Tikka

unread,
Mar 20, 2011, 3:06:20 AM3/20/11
to jenkins...@googlegroups.com
Of course Jenkins runs just fine with "java -jar jenkins.war" but I
wanted to have an app that I can easily start and stop.

So I created this: https://chiselapp.com/user/sti/repository/jenkins-app/

-- Sami

P.S. Is anyone working on a Jenkins plugin for Fossil SCM?

2011/3/18 Erik Ramfelt <eram...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages