我是gitlab的新手,在尝试构建时遇到问题。
这是我到gitlab的网址:http:// localhost / root / mytest,我在Linux虚拟机中安装了gitlab。
这是我的gitlab-ci.yml
image: maven:3.3.9-jdk-8
variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
SERVER_PASSWORD: ""
stages:
- build
- test
- deploy
cache:
paths:
- .m2/repository/
- target/
build:
stage: build
tags:
- my_tags
script:
- "mvn -X clean"
- "mvn -X install"
- echo "Building"
- mkdir build
artifacts:
paths:
- ./target/*.war
only:
- master
deploy_staging:
stage: deploy
tags:
- my_tags
script:
- echo "Deploy to staging server"
- "mvn -X install tomcat7:deploy"
environment:
name: staging
url: http://localhost:88
artifacts:
paths:
- target/*.war
only:
- master
这是工作cmd
1 Running with gitlab-runner 12.6.0 (ac8e767a)
2 on runner i7kvHx2T
3 Using Docker executor with image maven:3.3.9-jdk-8 ... 00:08
4 Pulling docker image maven:3.3.9-jdk-8 ...
5 Using docker image sha256:9997d8483b2fc521a4159feab922546dda0c5c22b5084f86dfab48f123ae4364
formaven:3.3.9-jdk-8 ...
7 Running on runner-i7kvHx2T-project-2-concurrent-0 via localhost.localdomain...
00:02
9
Fetching changes with git depth set to 50...
00:02
10 Reinitialized existing Git repository in /builds/project-2/.git/
11 error: cannot run ssh: No such file or directory
12 fatal: unable to fork
15 ERROR: Job failed: exit code 1
我真的不明白为什么失败,为什么是/builds/project-2/.git/而不是/builds/root/mytest.git。
非常感谢你。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。