我在保存工件时遇到问题。该项目分为3个模块,其中一个已保存,另外两个不保存。
克隆项目:
克隆到 '/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
日志管道:
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
哪里有问题?
GitLab 只能打包文物 https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html发现于$CI_PROJECT_DIR
目录 (/home/gitlab-runner/builds/Gso-uWvA/0/www/project-infoserwis
在你的例子中)。
您应该始终克隆 git 存储库并在文件夹中构建软件./
作为根目录并且不使用绝对路径:
job:
# do git clones and builds in . ($CI_PROJECT_DIR)
# ...
artifacts:
paths:
- project-root
expire_in: 10 min
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)