gpt4 book ai didi

continuous-integration - 无人机 CI/CD 只卡在执行管道中

转载 作者:行者123 更新时间:2023-12-05 04:49:48 26 4
gpt4 key购买 nike

当我使用 docker 管道时,它将成功构建。但是当我使用 exec 管道时,它总是停留在挂起状态。我不知道出了什么问题。

kind: pipeline
type: exec
name: deployment

platform:
os: linux
arch: amd64

steps:
- name: backend image build
commands:
- echo start build images...
# - export MAJOR_VERSION=1.0.rtm.
# - export BUILD_NUMBER=$DRONE_BUILD_NUMBER
# - export WORKSPACE=`pwd`
# - bash ./jenkins_build.sh
when:
branch:
- master

Docker 管道很好。

kind: pipeline
type: docker
name: deployment

steps:
- name: push image to repo
image: plugins/docker
settings:
dockerfile: src/ZR.DataHunter.Api/Dockerfile
tags: latest
insecure: true
registry: "xxx"
repo: "xxx"
username:
from_secret: username
password:
from_secret: userpassword

最佳答案

首先需要注意的是exec管道只能在Drone自托管时使用。官方写的docs :

Please note exec pipelines are disabled on Drone Cloud. This feature is only available when self-hosting

当 Drone 是自托管时,请确保:

  1. exec runner 是 installed
  2. 它在其config 文件中正确配置(以便能够连接到 Drone 服务器)
  3. drone-runner-exec 服务正在运行

服务启动后,查找其日志文件,您必须看到一条信息消息,说明它能够连接到您的 Drone 服务器:

level=info msg="successfully pinged the remote server"
level=info msg="polling the remote server"

还可以查看正在运行的服务的 Web UI(仪表板)if you enable it .

因此,如果您看到它可以轮询您的服务器,那么您的 exec 管道应该会按预期运行。

关于continuous-integration - 无人机 CI/CD 只卡在执行管道中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67463922/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com