0

我正在使用 gitlab runner,并按照快速入门指南正确链接了 runner。但是 yml 文件中存在一些问题。AFAIK 问题出在 docker 映像中。但不知道调试和修复它的步骤应该是什么。泊坞窗图像列在下面的日志中。构建工具和 adt 都在 beevelop/android 中。

# ANDROID_HOME should be setup in env
before_script:
    - pwd
    - chmod +x ./gradlew

dev:
  script:
    - ./gradlew assembleDebug

Gitlab Runner 日志:

gitlab-ci-multi-runner 0.7.2 (998cf5d)
Using Docker executor with image beevelop/android ...
Pulling docker image gitlab/gitlab-runner:build ...
Pulling docker image beevelop/android:latest ...

Running on runner-553c2779-project-109852-concurrent-0 via RC900...
Cloning repository...
Cloning into '/builds/rcmobile/bemol'...
Checking out bcd208a9 as master...
Note: checking out 'bcd208a9b4604905f2253511ed32410443428047'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at bcd208a... Merge remote-tracking branch 'origin/master'

bash: line 19: cd: /builds/rcmobile/bemol: No such file or directory

ERROR: Build failed with: exit code 1
4

1 回答 1

0

当我在配置了“docker”执行程序的 Windows 机器上运行 Gitlab 运行程序客户端时,我遇到了同样的问题。看来,当运行程序设置缓存容器时,它正在转义目录的 Windows 反斜杠(例如 \builds\development\project)。然后当它实际使用目录时,它使用的是 UNIX 正斜杠(例如 /builds/development/project),导致“没有这样的文件或目录”错误。从您的日志输出中,我无法判断这是否是相同的情况。

我不知道如何让缓存容器使用正确的目录。相反,我使用 Gitlab runner docker 客户端解决了这个问题,遵循了这里列出的一些文档:https ://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/码头工人.md

于 2015-12-18T18:19:54.550 回答