我在gitlab上有一个项目,我想使用gitlab CI / CD设置测试
我的项目结构是:
.
├── project
│ |── src
| └── pom.xml
├── .gitlab-ci.yml
└── Licence.txt
我的.gitlab.ci.yml
脚本如下:
image: maven:3.5.3
cache:
paths:
- .m2/repository/
- target/
build:
stage: build
script:
- mvn -f project/pom.xml compile
test:
stage: test
script:
- mvn -f project/pom.xml test
我的项目有Maven依赖项。但是运行这个我会收到错误:
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1
这看起来像是要将我的Maven工件上传到远程存储库之类的东西。
这是什么意思,怎么办?
感谢帮助!