Skip to main content

Configuration Jenkins Server

Today I’m gonna mention about how can we customize our Jenkins server configuration.

Firstly,opening Jenkins main page by entering http://localhost:8080/jenkins

After I opened the main page I need to sign up to the system by the help of login | sign up button at the upper right corner of the page.

Configure Global Security:

After I sign up to the server I can change my user setting by using this path: Manage Jenkins–>Configure Global Security

In this page,I need to pick Enable Security in order to change security settings

After that there are 2 titles in this page which are Security Realm and Authorization

In Security Realm; Jenkins’ own user Database should be selected.

In Authorization;Matrix-based security should be selected.


MANAGE JENKINS PAGE

We can manage all settings of Jenkins server by using Manage Jenkins–>Configure System

Configure System Page:

In this page, we can determine where Android SDK is,JDK,Ant,Maven,Jenkins Location.I want to start with Android SDK path:

Android Configuration:

I determine where my Android SDK is by giving its path like this:

/Users/servika/Desktop/adt-bundle-mac-x86_64-20140624/sdk(this is your android sdk path)

I recommend to click Automatically install Android components when required under the text box

Java JDK Configuration:

I also set JDK path by giving name and JAVA_HOME text input

As I said before,in order to get path of JAVA_HOME we need to write echo $JAVA_HOME in terminal and we should to see output like this:

/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home(this is where your JDK is located)
after that I need to copy this path to JAVA_HOME text input
if your build type is Ant you can download it from internet as shown there
Maven Configuration:
 
Actually this process is same with JDK configuration so just write echo $M2 to the terminal and we need to copy this path to the text box under the maven project configuration.
 
echo $M2 output should be like this:
 
/Users/servika/Documents/dev/apache-maven-3.2.2/bin

How to Setup Jenkins on Mac – Part 2

Today I’m gonna talk about installing Jenkins Server.

I installed all dependencies so we can continue.

As I mentioned before Tomcat is an application server so we can run our Jenkins server on it.

I will download jenkins.war from its official page and install on Apache Tomcat application server.

First of all I’m downloading jenkins.war from here:http://mirrors.jenkins-ci.org/war/latest/jenkins.war

I need to move jenkins.war file to where I downloaded Apache Tomcat application server.

I need to cut/paste to apache-tomcat-8.0.9/webapps

When I paste my jenkins.war file to that folder its turned into Jenkins folder automatically.

After all,I should to see my jenkins server on:http://localhost:8080/jenkins

How to Setup Jenkins on Mac – Part 1

I want to mention how to setup a Jenkins server on our Mac OSX machine.I will to explain setup process step by step so I will separate each step by numbers.

Before I start to setup Jenkins I need to install some dependencies which are Java 1.7 JDK,Maven 3.2.2),Apache Tomcat 8.

I’m starting to explain with first dependency which is Java JDK:

1)Setting Up Java JDK

Firstly I’m downloading java from its official web page by following this path:jdk-7u65-macosx-x64.dmg.After I downloaded necessary folders I need to set JAVA_HOME path for java jdk folder so I will use terminal in order to do that.In terminal,I can use vim text editor so I’m writing vim .bash_profile to go to the vim and then I need to write this command here:

export JAVA_HOME=$(/usr/libexec/java_home)

After I set JAVA_HOME I need to save and quit from vim editor so I need to click ESC button and then writing :wq! then clicking ENTER button.

Finally I can complete my installing process by checking whether it’s installed successfully or not so I need to use java -version command in terminal.

Output of this command should be like this:

java version “1.7.0_*”
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

*(it can be 51-58-60)

I also need to see where java is installed by using echo $JAVA_HOME in terminal

It should returns a output like this:

/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home

2)Setting Up Maven

I can continuous with maven setup after I completed to install Java JDK on my machine. I need to download maven from this path:apache-maven-3.2.2-bin.tar.gz after I unzip and download I need set its M2 path in my machine so I need to use again vim text editor.I’m opening it by entering vim .bash_profile in terminal.After I opened vim editor I need to click I(letter) in order to insert new entry in vim text editor.

I need to add these export commands in my terminal:
export M2_HOME=/Users/zafer/Documents/dev/apache-maven-3.2.2
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

All exports should be like this:

export JAVA_HOME=$(/usr/libexec/java_home)
export M2_HOME=/Users/zafer/Documents/dev/apache-maven-3.2.2
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export PATH=$JAVA_HOME/bin:$PATH

As I said before you need to shut down vim editor by clicking ESC button and then :wq!

I need to check installing process whether its completed successfully or not so I’m writing

mvn –version

I should to see this output in my terminal:

Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T16:51:42+03:00)
Maven home: /Users/zafer/Documents/dev/apache-maven-3.2.2
Java version: 1.7.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “mac os x”, version: “10.9.4”, arch: “x86_64”, family: “mac”

I also should to see where maven is installed by using this command in terminal:

echo $M2

It should returns an output like this:

/Users/zafer/Documents/dev/apache-maven-3.2.2/bin

3)Setting Up Apache-Tomcat 8

We need manage our Jenkins by using any Application server so I prefer to use Apache Tomcat.Actually This process is simple easy just use this path:tar.gz unzip and install on your local machine.

By the way,I can recommend to use Tomcat Controller in order to open and shut down our Tomcat Application Server easily.

We can download it from here:http://tomcat-controller.en.softonic.com/mac/download