簡體   English   中英

Gitlab Runner無法使用較新的yml格式創建android構建

[英]Gitlab Runner fails creating android build using the newer yml format

我正在使用gitlab運行程序,並已按照快速入門指南正確鏈接了運行程序。 但是yml文件中存在一些問題。 AFAIK,問題出在docker映像中。 但是不知道調試和修復它應該采取的步驟。 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

當我在配置了“ docker”執行程序的Windows機器上運行Gitlab運行程序客戶端時,遇到了同樣的問題。 看來,當運行程序設置緩存容器時,它在轉義Windows的目錄反斜杠(例如\\ builds \\ development \\ project)。 然后,當它實際使用目錄時,它使用的是UNIX正斜杠(例如/ builds / development / project),從而導致“無此文件或目錄”錯誤。 從您的日志輸出中,我無法確定是否存在相同情況。

我不知道如何使緩存容器使用正確的目錄。 取而代之的是,我按照下面列出的一些文檔使用GitlabRunner docker客戶端解決了這個問題: https ://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/ 碼頭工人

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM