Official website : http://jenkins-ci.org/
Continuous integration is a set of practices that is to verify that each change of the source code, they do not cause regression of the application. This allows to detect problems as early as possible and then to warn development teams. The interest is to incorporate regular basis the work of each developer, and thus avoid the pooling of a sudden developments of several people, which often causes problems.
For integration continues to happen, it is necessary that the sources of the project are hosted on a source control manager (SCM) as SVN or Git. Developers should make a habit of regularly send their amendments to the SCM integration server to analyze the application code. Implement comprehensive unit testing is strongly recommended, as they will be launched by the continuous integration server.
Have the source project hosted on a SCM, take the time to code unit testing, and commits regularly modifications.
Jenkins is used as a tool SourceSup. To activate it, go to the “Administration” menu of your project, then in the submenu “Tools” and check the box “use continuous Integration plugin”. A new tab called “Continuous Integration” then appear in the tab bar. This leads to a page that displays Jenkin and Sonar interfaces.
SourceSup platform allow access to Jenkins. There is no Jenkins creation account needed. Once logged on SourceSup via identity federation, users will also be identified on Jenkins when they access it.
The latest versions of Subversion and Git Jenkins plugins use Credentials, to authenticate to a server SVN or Git for example. These credentials will have to be filled again by users.
In order to use Subversion repositories and private Git, you must create a credential on the Jenkins server. By verifying that you are logged in, click on your email at the top right of the screen, and select the menu item “credentials”, choose “Global credentials” and click add Credential.
In the configuration of a job, if you use subversion or git, you can use your credentials.
Use of Jenkins server, through the creation of jobs. The purpose of a job is a project builder and perform a set of actions before or after the build (get the source project from SCM, publish the results, analyze the code via the Sonar server, etc. …). The build can be simple or more complex and perform actions maven / ant or other.
A job can be created in several ways.
It will be better to create a job using the creation of “free-style”. The job will then be set precisely, and permissions.
The user who creates the job is the owner and administrator by default. So it has all the rights to this job, then it free to add users to the project as well as giving them rights. The identifier for adding users being SourceSup email.
The results of builds jobs are saved and logged. It is possible and even recommended to remove too old builds on earlier versions of the project. For this check the “delete old builds” and indicate the number of build you want to keep. It is also possible to specify how long you want to keep your old builds, in days.
Source Manager is essential, we must choose between SVN and Git, then enter the URL of the repository. Indeed continuous integration is meaningless if the sources of the project are not provided.
Builds can be triggered manually by the user or automated.
Example of a build triggered daily, and will check every hour deposition to see if changes have occurred.
To appeal to an action of a build manager, simply add a step to build and select the desired action. For Maven, select “Invoke Maven targets high-level”, and then specify the command to run.
To run a job, click on the link “launch a build”. The execution then starts the queue executions and will be launched when his turn comes. The results are shown graphically, a green circle indicates that the build was successful, a red circle indicates failure. For details, the “console output” link allows you to view logs of execution.
A history of builds that are available, it keeps logs and results of all previous builds.
Sonar, it is important that a user has the rights to the job starts once the build by hand. This will give the rights to that user to administer the results of the analysis on the Sonar server. Builds can then be launched automatically. If an analysis has already been launched automatically, simply run the build job in hand once for the rights with the sonar server.
Jenkins will be regularly updated with the official release of the new version of the server. Restarting the server Jenkins may be necessary to take account of plugins / updates, an email will notify users in this case.
You can see all the available plugins on the site Jenkins : Official Jenkins plugins list
To add a plugin that is not installed on our platform, you can ask the team SourceSup :support. The application will be reviewed and the plugin will be installed if its usefulness for the platform is proven.