Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity command line build step can not find files

Tags:

teamcity

So, when I attempt to run a script file in a TeamCity build step (Command line build step) I get the following error:

Step 1/8: Download provisioning profile (script file) (Command Line)
[12:23:07][Step 1/8] Starting: /Applications/TeamCity/buildAgent/work/83a21295522e711a/TeamCityCustomBuildScripts/DownloadProvisioningProfile.sh
[12:23:07][Step 1/8] in directory: /Applications/TeamCity/buildAgent/work/83a21295522e711a/Project
[12:23:07][Step 1/8] Cannot run process /Applications/TeamCity/buildAgent/work/83a21295522e711a/TeamCityCustomBuildScripts/DownloadProvisioningProfile.sh : file not found
[12:23:07][Step 1/8] Step Download provisioning profile (script file) (Command Line) failed with unexpected error

I can find and run the script manually at the exact place the build step tells me it can not find it.

What could be wrong here?

like image 524
aPerfectMisterMan Avatar asked Dec 07 '15 13:12

aPerfectMisterMan


1 Answers

As commented, this appears to be a permission problem. Either on the file itself, or on one of the directories.

Which user does the teamcity agent run as?

Does that user have full access to the desired location?

Change the permissions so that the agent has access to the script and it should work.

like image 81
Daniel Scott Avatar answered Sep 20 '22 09:09

Daniel Scott