flowci 构建任务运行卡住
xunyao4dev opened this issue · 5 comments
xunyao4dev commented
gy2006 commented
是私有仓库嘛? 如果是的话需要配置 Git 仓库的访问权限,可以参考 https://flowci.github.io/#/cn/git/index
xunyao4dev commented
@gy2006 想问下执行clone任务的是不是flowci/agent镜像,我进入镜像里面,把ssh key加进去了,在里面可以进行clone了,另外也在页面上添加了ssh key并且配置到了yaml中,同时把这个ssh key添加到了git 的ssh key中
gy2006 commented
这个需要看一下你的 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 中执行
xunyao4dev commented
@gy2006 配置如下
#
# Maven Project Template
#
envs:
# Git config
FLOWCI_GIT_URL: "git@gitee.com: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'
gy2006 commented