Can't run “pod install” in jenkins

后端 未结 3 1262
一个人的身影
一个人的身影 2021-01-04 05:16

My slave machine of Jenkins is Mac 10.8. Jenkins run job on my slave machine and run shell command of cocoapods below:

pod install 

and got

相关标签:
3条回答
  • 2021-01-04 05:53

    Ran into the same problem today, but neither of the solutions worked. What did work was changing the install command.

    /usr/local/bin/pod install
    
    0 讨论(0)
  • 2021-01-04 06:00

    In my case, my ruby is installed by rvm. I need to load rvm in to find the pod command.

    What I did is add this line #!/bin/bash -l in the beginning of the jenkins job.

    0 讨论(0)
  • 2021-01-04 06:05

    It seems the user with which Jenkins is running is not getting the path to the pod command that you are able to successfully execute from the Node's command shell. All you need to do is explicitly add the path in PATH variable in your Node's configuration page. To do this, Go to Jenkins > Manage Jenkins > Manage Nodes > Select the Node where your job is running > Click on Configure > Enable Node Properties. Refer the screenshot below:

    enter image description here

    Just add the path to your pod command in PATH variable. For ex., if the pod command is present in /usr/bin, then in the name field, enter PATH and in the value field, enter /usr/bin/:$PATH

    I have not worked on Mac but hopefully, the above command should work there too. If it doesn't work, you can put the following line in $HOME/.bash_profile file of the user with which Jenkins is running: PATH=path_to_pod:$PATH

    You can find the path to pod command by typing which pod on command line.

    0 讨论(0)
提交回复
热议问题