user1532669
user1532669

Reputation: 2378

Installing and configuring Jenkins after installing Laravel with composer

I'm getting started with Laravel and Jenkins. First time using either of these technologies. I have Laravel installed and got the welcome page showing. I now want to install Jenkins. I was looking at this tutorial but that installs Laravel differently. I've used composer to install Laravel so I'm not entirely sure how I should do the "configure the build" step:

Configure build

Now clone my github repository laravel-jenkins which is the boilerplate for all the config files and the Jenkins job.

cd /var/www
git clone git://github.com/modess/laravel-jenkins.git
mv laravel-jenkins/* laravel/
cd /var/www/laravel

Now you should have these files in your Laravel directory as well:

build/
- code-browser/
- coverage/ 
- logs/
- pdepend/
- phpcs.xml (PHP Code Sniffer config)
- phpmd.xml (PHP Mess Detector config)
build.xml (build config)
config.xml (Jenkins job config)
phpunit-bootstrap.php (PHPUnit bootstrap script)
phpunit.xml.dist (PHPUnit config)

Can anyone offer any suggestions on how best I proceed with this?

Upvotes: 1

Views: 3021

Answers (1)

BigScaryDuck
BigScaryDuck

Reputation: 166

There is no issue that you installed Laravel via Composer opposed to the git clone recommended in the article (your approach is actually the recommended approach according to Laravel Docs).

To answer your primary question the instructions are having you git clone the authors public Github repo which provides files that will be moved over into your laravel project (they are unique files so nothing from Laravel will be overwritten). Here is a breakdown:

For Reference: I am assuming you followed his example and your Laravel project will is located in /var/www/laravel.

  1. "cd /var/www" - This will bring you to the parent folder of your Laravel project (there should only be laravel/ and an index file of some sort in this folder)
  2. "git clone git://github.com/modess/laravel-jenkins.git" - This will pull all the files from the authors public git repo, if you feel more comfortable you can download as ZIP directly from Github and upload via SFTP or FTP (or just use wget). These files will be located in a newly created folder located at /var/www/laravel-jenkins
  3. "mv laravel-jenkins/* laravel/" - This command just moves all files and folders from /var/www/laravel-jenkins/ to /var/www/laravel (if the files being moved already exist in /var/www/laravel they will be overwritten)

That is all that is needed to be done to have the authors "Jenkins/Laravel Boilerplate" active on your Laravel install.

IMPORTANT NOTE: You said you were using Laravel 5 and the authors instructions are specifically for Laravel 4, there is a very high possibility that this tutorial will not work in a Laravel 5 project as the file structures between Laravel 4 and 5 have many differences.

Upvotes: 3

Related Questions