php - Using Jenkins for Yii Codeception tests -


i trying automate yii 2 tests using jenkins. since tests have been decentralized, see tests run @ once. this, have created small shell script

test-all.sh

#!/bin/bash codecept in */tests     i=${i%tests}     cd "$i"     codecept run --fail-fast     cd ../ done 

when run command-line (git bash), tests run properly. however, when run file in jenkins, although build returns successfully, no tests being run.

[ci] $ "c:\program files\git\usr\bin\sh.exe" -xe c:\windows\temp\hudson8239762865441374376.sh + cd /c/xampp/htdocs/mtnt-2 + /usr/bin/bash test-all.sh /c/xampp/htdocs/mtnt-2 test-all.sh: line 3: which: command not found test-all.sh: line 8: codecept: command not found test-all.sh: line 8: codecept: command not found test-all.sh: line 8: codecept: command not found test-all.sh: line 8: codecept: command not found finished: success 

it can't seem find which command , codecept command both in path variable.

how fix this?

updates

so far, have attempted changing path master node. didn't suffice. confirmed through jenkins -> manage jenkins -> system information path global composer vendor bin included in path variable.

i tried having codeception locally in project. new test-all.sh script thus

#!/bin/bash root_folder=`pwd` in */tests     i=${i%tests}     cd "`pwd`/$i"     $root_folder/vendor/bin/codecept run --fail-fast     cd ../ done 

now, following error.

[ci] $ "c:\program files\git\usr\bin\bash.exe" -xe c:\windows\temp\hudson2613836971033972638.sh + cd /c/xampp/htdocs/mtnt-2/ + ./test-all.sh /usr/bin/env: sh: no such file or directory /usr/bin/env: sh: no such file or directory /usr/bin/env: sh: no such file or directory /usr/bin/env: sh: no such file or directory finished: success 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -