【问题标题】:Cant get Jenkins to work with fastlane无法让詹金斯与快车道合作
【发布时间】:2018-05-27 15:56:45
【问题描述】:

我有一个 Jenkins 服务器,它可以拉出我的构建并构建它,在 shell 脚本中,我有一个通过分发运行的 fastlane 命令。问题是它永远无法成功执行。

我的shell代码很简单:

bundle exec fastlane distribute_to_testflight

在我的项目中使用 fastlane 插件时调用。

结果:

 $ bash -c export
    $ bash -c "test -f ~/.rvm/scripts/rvm"
    $ bash -c "test -f ~/.rvm/scripts/rvm"
    [App] $ bash -c " source ~/.rvm/scripts/rvm && rvm use --install --create 2.4.1 && export > rvm.env"
    Using /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1
    [App] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/jenkins2674080270342174416.sh
    + bundle exec fastlane distribute_to_testflight
    /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/spec_set.rb:88:in `block in materialize': Could not find CFPropertyList-2.3.6 in any of the sources (Bundler::GemNotFound)
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/spec_set.rb:82:in `map!'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/spec_set.rb:82:in `materialize'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/definition.rb:170:in `specs'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/definition.rb:237:in `specs_for'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/definition.rb:226:in `requested_specs'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/runtime.rb:108:in `block in definition_method'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/runtime.rb:20:in `setup'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler.rb:107:in `setup'
        from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.0/lib/bundler/setup.rb:20:in `<top (required)>'
        from /Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    Build step 'Execute shell' marked build as failure
    Finished: FAILURE

我不确定这个问题,如您所见,我在 jenkins 用户上安装了带有 rvm 的 ruby​​,但在我的主项目中,我处理代码,我只有在实际项目 repo 中有我的 ruby​​ gems 和文件我承诺使用 git,所以也许我可以让 jenkins 使用它从 repo 中提取的内容?

我真的迷路了,所以关于这个问题的任何指导都会很棒

【问题讨论】:

    标签: ios jenkins continuous-integration rvm


    【解决方案1】:

    我遇到了同样的问题,并通过在调用 bundle exec 之前调用 bundle install 来修复它:

    bundle install 
    bundle exec fastlane distribute_to_testflight
    

    然后我在我的车道顶部使用以下 Fastlane 命令,因此从那时起它应该保持最新状态:

    bundle_install()
    

    【讨论】:

      【解决方案2】:

      CFPropertyList-2.3.6 是主要 ruby​​ gem 存储库中可用的 gem,地址为:https://rubygems.org

      所以在 Gemfile 中添加或设置:

      source "https://rubygems.org"
      

      然后运行

      bundle install
      

      并确保您的机器可以上网。

      【讨论】:

        猜你喜欢
        • 2018-07-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多