DevOps

Build PHP Application With Jenkins

This tutorial help to create Building a PHP Project in Jenkins.We will go through process of CI(Continuous Integration) for PHP.
I believe, You have gone gone through the installation of Jenkins plugin on the system.

Let’s taking one step ahead and create a job/item in Jenkins for our PHP project. I am creating project for PHP. PHP is interpreted language So don’t need any compiler to create build jar/exe file. We just copy files from our work-space to production /var/www/ folder.

I am assuming you have created your build and config file of your PHP project and mentioned source and target location of your file into config.xml file.This is very simple article which help to understand functionality of creating job in Jenkins and how’s set job parameters, I am not using any version control like SVN/GIT.

I am using Apache Ant for create build on server.You don’t have Apache Ant on your jenkins server yet. You can install using below command on linux and for windows you can refer this article

sudo apt-get install ant

Create and Build PHP project in Jenkins

Step 1: Click New Item option from left-hand sidebar menu.

Step 2: Write your Job Name ex-PHPbuild and select Free style project.

Step 3: Select Source Code management NONE.

Related Post

Step 4: Choose Invoke ANT under Build Environment.

Step 5: Select 'ANT' profile from Invoke ANT dropdown.

This dropdown has your ant profile which you have installed on your system, if you do not have any please write down a ant profile name and select Install automatically ant.

Step 6: Save your job.

Step 7: Go to your Jenkins dashboard and select your job PHPbuild.

Step 8: Clicked Build Now link.

Now you can see your build under build history, if the circle color is blue that means your have created successfully build otherwise color will be red – Your build end with error. You can see you error message using console output.

View Comments

Recent Posts

Configure and Retrieve S3 Information Using Laravel PHP-AWS-SDK

This tutorial helps integrate a PHP SDK with Laravel. We'll install aws-php-sdk into laravel application and access all aws services… Read More

2 months ago

What is the Purpose of php_eol in PHP?

in this quick PHP tutorial, We'll discuss php_eol with examples. PHP_EOL is a predefined constant in PHP and represents an… Read More

8 months ago

Laravel Table Relationship Methods With Example

This Laravel tutorial helps to understand table Relationships using Elequonte ORM. We'll explore laravel table Relationships usage and best practices… Read More

8 months ago

Exploring the Power of Laravel Eloquent Join?

We'll explore different join methods of Laravel eloquent with examples. The join helps to fetch the data from multiple database… Read More

9 months ago

Quick and Easy Installation of Laravel Valet

in this Laravel tutorial, We'll explore valet, which is a development environment for macOS minimalists. It's a lightweight Laravel development… Read More

9 months ago

What is Laravel Soft Delete and How Does it Work?

I'll go through how to use soft delete in Laravel 10 in this post. The soft deletes are a method… Read More

9 months ago

Categories