I have set up Jenkins to run a Phing task every time we commit to our repo, php-lint,
documentor, mess detector and a few other. This is working perfectly but I wanted to expand it to perform
composer install. Now Phing can
do this via ComposerTask but
not when using a svn repo and called via Jenkins.
When run via Phing this is the error you get
Lets take a step back and have a look at the composer.json file
Try adding user and password details?
My first theory was to try adding the username and password to the url
"url": "http://user:[email protected]/reponame/", but that still came back with the
Try storing the login details?
The next idea was to run
composer install from the cmd line on the Jenkins box as the jenkins user in the hope that the credentials
would then be stored and available for the web interface.
Composer then asked me for my svn login details and pulled the packages in successfully. Good start but the web interface still had issues.
After wondering if this was going to be possible at all I figured I would repeat my last attempt. It was asking me for my credentials, why would this be as they should be stored?
Turns out they where not being stored. A quick edit of
~/.subversion/config, uncommenting the lines with
and setting them to yes, a quick run of
composer install to save the svn login details then allowed me to run the Jenkins task and it worked. Hurrah!