flow-core-x
flow-core-x copied to clipboard
flowci 构建任务运行卡住

build 的是一个mvn,但是一直卡住git clone那一步
是私有仓库嘛? 如果是的话需要配置 Git 仓库的访问权限,可以参考 https://flowci.github.io/#/cn/git/index
@gy2006 想问下执行clone任务的是不是flowci/agent镜像,我进入镜像里面,把ssh key加进去了,在里面可以进行clone了,另外也在页面上添加了ssh key并且配置到了yaml中,同时把这个ssh key添加到了git 的ssh key中
这个需要看一下你的 YAML 配置
如果在 Step 中没有配置镜像的话,就会在 flowci/agent 中执行 比如:就会在 Agent 上直接执行
steps:
- name: clone
plugin: 'gitclone'
allow_failure: false
如果在 Step 中配置了 Image,就会在配置的 Image 中执行,比如
steps:
- name: clone
docker:
image: flowci/debian-git
plugin: 'gitclone'
allow_failure: false
就会在 flowci/debian-git 中执行
@gy2006 配置如下
#
# Maven Project Template
#
envs:
# Git config
FLOWCI_GIT_URL: "[email protected]:jarvan4dev/flyway-schema.git"
## Credential name if git repo url is ssh or login required for http
FLOWCI_GIT_CREDENTIAL: "thinkingdata"
docker:
image: "maven:3.6-jdk-8"
steps:
- name: clone
docker:
image: flowci/debian-git
plugin: 'gitclone'
allow_failure: false
- name: run unit test
envs:
MVN_CMD: "mvn clean test"
plugin: 'maven-runner'
- name: junit upload
plugin: "junit-report-uploader"
- name: jacoco upload
plugin: "jacoco-report-uploader"
- name: package
envs:
MVN_CMD: "mvn package -Dmaven.test.skip=true"
plugin: 'maven-runner'
- name: upload
envs:
artifact_pattern: "*.jar"
plugin: 'artifact-upload'
用你的项目试了一下,可以 clone Gitee 的项目

Agent 是自己添加的嘛? 还是使用 flow.ci 默认的呢?