Jenkins is the leader among open source automation solutions. Jenkins is provided with hundreds of plug-ins in order to support, create, deploy and automate any project. Jenkins is written in Java and, according to subjective users’ estimates, is, to put it mildly, not the fastest continuous integration solution for the DevOps.

However, this is a fairly flexible tool that is used to automatically perform various tasks. For development projects, it can be assembly tests, error checking, reporting and documentation generation, and much more. For example, the use of Jenkins as a monitoring system is atypical, but reasonably working solution. Why is this possible? Because the tasks for Jenkins are described in the xml file. After the formation of the file, the server executes its contents on schedule or manually. Each task contains a set of commands: for example, creating folders and running the application installation script.

As previously stated, Jenkins has a large number of plug-ins for integration with other systems and extension of the functionality. Therefore, in case of automation of tasks related to development, it is necessary to work with repositories. For each of them there is a custom plug-in.

Overall, for the purpose of providing common understanding, it should be said that Jenkins itself isn’t able to do anything, it only manages other processes and plug-ins. For example, if you are setting sights on the integrity of code in a PHP project, you might be interested in the following configuration.

Jenkins, PHP CodeSniffer packages, PHP Mess Detector, PHP Copy / Paste Detector and the like are installed on the Linux server, a script is created with which the above packages with certain parameters will be launched and the result obtained.

In this instance, Jenkins will enable the creation of a project task that will get the new version from the code repository, launch the build process, that is checking the PHP code with the above-mentioned packages in this case, parse the results of the script using the plugins specified in Post-Built Actions when creating a task. In the same place, you can specify the necessity to send notifications of progress made.

Of course, in practice, everything is a bit more complicated. For example, in order for the distribution of notifications to work, you must specify the SMTP parameters in the server settings. However, since the main purpose of this publication is to show the working principle of the Jenkins product, these and many other nuances remain behind the scenes.

We automate the process of continuous integration, [email protected]