I have activated phpcs on my Jenkins Continuous Integration Build to be able to check my Code Styling, having Jenkins running on a AWS EC2 micro-machine, the build was taking forever, this wasn't a solution, so I look for alternative and found Eclipse PHP Tool Integration!
In fact, why activating phpcs on Jenkins if we can have direct feedback from the IDE ?
Before Installing Eclipse we need to have JVM installed, you can install Sun Java or OpenSDK but NOT the GCJ (GNU Java tools), here I have used Sun Java, in your terminal type:
$ sudo apt-get update
$ sudo apt-get install sun-java6-bin sun-java6-javadb sun-java6-jdk sun-java6-plugin
Make Sun Java the Java runtime of your choice:
$ sudo update-java-alternatives -s java-6-sun
Check, if Java is properly installed:
$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
Then we need to set the Java environment variable $JAVA_HOME
Edit the file/etc/profile and at the end add:
Note that you may need to log off and login again to ensure Java is properly recognized by your system.
Installing the Jenkins Debian packages
This is the Debian package repository of Jenkins to automate installation and upgrade. To use this repository, first add the key to your system:
$ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
Then add the following entry in your /etc/apt/sources.list:
$ deb http://pkg.jenkins-ci.org/debian binary/
Update your local package index, then finally install Jenkins:
$ sudo apt-get update $ sudo apt-get install jenkins
You should now be able to access jenkins at the URL: http://ci-build.yourdomain.com:8080/
Installing the PHP Tools packages to be used with Jenkins:
This is the first post of a Tutorial to set up a PHP Software development environment including the Project Management, Continuous Integration, Software Quality metrics, Software Testing and Debugging Tools. This post is about the set up of the Virtual machines, I will post the following Tutorial parts in the coming days, the first few parts will be about the environment setting up then after we will see the usage of the tools we have installed.
So let's type in our console:
$ apt-get install virtualbox
Virtualbox installed, now let's create 5 virtual machines: