如果目录中存在Gemfile,则Gitlab-runner失败

时间:2020-07-20 10:03:21

标签: gitlab gitlab-ci-runner fastlane

如果目录中没有Gemfile,Gitlab运行程序将失败。当我从目录中删除文件时,此问题得到解决。但是该文件必须存在于项目中

enter image description here

sys.path.insert(0, path)

我尝试了什么

  • 我将Gemfile重命名为Gemfile_fix,并将以下变量添加到.gitlab-ci.yml

    变量:

    BUNDLE_GEMFILE:“ Gemfile_fix”

  • 作为我尝试的另一种解决方案 我创建了一个名为gemfile_fix的文件夹,并将Gemfile添加到该文件中,再次将以下变量添加到gitlab-ci.yml文件中

    变量:

      Running with gitlab-runner 12.1.0 (de7731dd)
       on Mac-Mini f96_aywm
    Using Shell executor...
    00:00
    Running on siab01ios.siab01.com...
    00:01
    Fetching changes...
    00:03
     Initialized empty Git repository in /Users/gitlabrunner/builds/f96_aywm/0/reactnative/xxxx/.git/
     Created fresh repository.
     From https://gitlab.xxxx.com/reactnative/xxxx
      * [new ref]         refs/pipelines/5138   -> refs/pipelines/5138
      * [new branch]      bugfix                -> origin/x
      * [new branch]      develop               -> origin/develop
      * [new branch]      feature/xxxxx-server  -> origin/feature/x-x
      * [new branch]      feature/xxxxxxxxxx    -> origin/feature/x
      * [new branch]      feature/xxxxxxxxxxxxx -> origin/feature/x
      * [new branch]      feature/xxxxxxxxx     -> origin/feature/x
      * [new branch]      master                -> origin/master
      * [new tag]         2.0                   -> 2.0
      * [new tag]         android/2.1.0         -> android/2.1.0
      * [new tag]         android/2.1.1         -> android/2.1.1
     Checking out cd81e8c9 as feature/xxx...
     Skipping Git submodules setup
     ERROR: Job failed: exit status 1
    

enter image description here

**

gitlab-ci.yml

**

BUNDLE_GEMFILE: Dir.chdir File.expand_path('gemfile_fix/Gemfile', __FILE__)

0 个答案:

没有答案