当我尝试通过Jenkins构建应用程序时,会发生这种情况。 我已经消灭了Jenkins中的当前工作区并构建了应用程序并抛出了以下错误
[workspace] $ touch Pods rm -r -f Pods pod repo update
[workspace] $ pod install
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
[0m
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/bin/pod install
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 0.37.2
Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
RubyGems : 2.5.2
Host : Mac OS X 10.10.3 (14D136)
Xcode : 6.3.2 (6D2105)
Git : git version 2.3.2 (Apple Git-55)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ efe0250cfcdd610a45cdd5691bd3c6bcb38669be
```
### Plugins
```
cocoapods-plugins : 0.4.2
cocoapods-trunk : 0.6.1
cocoapods-try : 0.4.5
```
### Podfile
```ruby
platform :ios, '7.0'
pod 'AFNetworking', '1.3.2'
pod 'FMDB', '~> 2.3'
```
### Error
```
Errno::EEXIST - File exists - /Users/jenkins/.jenkins/jobs/App-iOS-Trunk/workspace/Pods
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/sandbox.rb:58:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/config.rb:202:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/config.rb:202:in `sandbox'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:69:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.2/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:46:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=File+exists+-+%2FUsers%2Fjenkins%2F.jenkins%2Fjobs%2FeLearner-Native-iOS-Trunk%2Fworkspace%2FPods&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Build step 'Update CocoaPods' marked build as failure
Finished: FAILURE
对于尚未擦除当前工作空间的其他应用程序,构建成功。但是,当我擦除当前工作空间时,它显示上面的错误。
答案 0 :(得分:4)
在&#34;执行shell&#34;中添加export LANG=en_US.UTF-8
调用pod
之前的脚本修复了我的Jenkins框。另请考虑使用-d
检查目录。
# Cocoapods
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
if [ -d Pods ]; then
rm -rf Pods
fi
pod repo update
pod install
# ...