Trying to understand this CI thing so I've downloaded Jenkins in my production server...
1. Is Jenkins (or any other CI system) installed in the production server or I should have a separate server for Jenkins builds? If Jenkins is in another server, how can I integrate the builds as my running production code? Or this CI thing does have nothing to do with deploys?
Then I created a SSH key at /var/lib/jenkins/.ssh added to my Bitbucket (Git) repository as Deployment key...
2. Is this the correct approach?
...And set the repository URL git@bitbucket.org:...
with jenkins
user credentials in the Git plugin at project settings.
So far so good, my build checkout the project to the Jenkins workspace, then I noticed that every build it run is a checkout and for every checkout, as a Composer powered project, my vendors/
directory isn't there, so I don't have the autoload.php
file that phpunit.xml
uses as bootstrap to load the classes and run the tests. So besides phpunit
as one of the build shell commands I've added composer init
.
3. Is this right? Should I run composer init
on every build?
The main question maybe is: are my builds constructed from greenfield space? Should I checkout and run composer install
and whatever scripts my project must take to be running every time (every build)?
Thanks!