Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins not recognizing composer command

I have a local install of JenkinsCI. Installed via instructions in the Chapter 2 of Jenkins The Definitive Guide. I start Jenkins via Java Web Start/JNLP file on my MAC running El Capitan. All that went great, sample project is working.

I know want to get my Codeception Acceptance test running via Jenkins. I'm following the most recent blog post about this on the Codeception site: http://codeception.com/02-04-2015/setting-up-jenkins-with-codeception.html#.VwWxE2PLRAZ.

Using the Execute shell build step, my build fails with the following message:

Started by user anonymous

Building in workspace /Users/Cosette/.jenkins/workspace/Project Name

[Project Name] $ /bin/sh -xe /var/folders/ns/ly6hv_513tl6qqslrb2vj_dw0000gn/T/hudson9210778078639547082.sh

  • composer install

/var/folders/ns/ly6hv_513tl6qqslrb2vj_dw0000gn/T/hudson9210778078639547082.sh: line 2: composer: command not found

Build step 'Execute shell' marked build as failure

Finished: FAILURE

My guess is that maybe this install type doesn't install the Jenkins user? Please note I am very beginner level and this is my first question here on stackoverflow. Also, That should be a + sign in front of "composer install".

like image 721
CosetteN Avatar asked Nov 09 '22 17:11

CosetteN


1 Answers

You should download composer from https://getcomposer.org/, rename it to composer, make executable with chmod +x and place somewhere in the PATH of Jenkins.

like image 129
Konstantin Pelepelin Avatar answered Nov 14 '22 23:11

Konstantin Pelepelin