[英]Gitlab CI - not supported: outside build directory
I have a problem with saving the artifact.我在保存工件时遇到问题。 The project is divided into 3 modules, one of them is saved and the other two are not.项目分为3个模块,一个保存,另外两个不保存。
Clonning project: Cloning into '/home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis/../project-root Cloning into '/home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis/../project-core克隆项目:克隆到'/home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis/../project-root 克隆到'/home/gitlab-runner/builds/Gso-uWvA/0 /www/project-infoserwis/../project-core
artifacts:
paths:
- /home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis
- /home/gitlab-runner/builds/Gso-uWvA/0/www/project-root
expire_in: 10 min
LOGS pipeline:日志管道:
Uploading artifacts...
Runtime platform arch=amd64 os=linux pid=24943
revision=54944146 version=13.10.0
/home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis: found 2240
matching files and directories
WARNING: /home/gitlab-runner/builds/Gso-uWvA/0/www/project-root: not
supported: outside build directory
WARNING: /home/gitlab-runner/builds/Gso-uWvA/0/www/project-root/pom.xml:
not supported: outside build directory
WARNING: /home/gitlab-runner/builds/Gso-uWvA/0/www/project-root/src: not
supported: outside build directory
WARNING: /home/gitlab-runner/builds/Gso-uWvA/0/www/project-root/src/main:
not supported: outside build directory
WARNING: /home/gitlab-runner/builds/Gso-uWvA/0/www/project-
root/src/main/resources: not supported: outside build directory
WARNING: /home/gitlab-runner/builds/Gso-uWvA/0/www/project-
root/src/main/resources/application.properties: not supported: outside build
directory
Where is the problem?问题出在哪儿?
GitLab is only able to package artifacts found in the $CI_PROJECT_DIR
directory ( /home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis
in your example). GitLab 只能打包在$CI_PROJECT_DIR
目录中找到的工件(在您的示例中为/home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis
)。
You should always clone git repositories and build software in folders with ./
as root directory and not use absolute paths:您应该始终克隆 git 存储库并在以./
作为根目录的文件夹中构建软件,而不是使用绝对路径:
job:
# do git clones and builds in . ($CI_PROJECT_DIR)
# ...
artifacts:
paths:
- project-root
expire_in: 10 min
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.