Drone CI/CD 只停留在 exec 管道中 (Drone CI/CD only stuck in exec pipeline)


問題描述

Drone CI/CD 只停留在 exec 管道中 (Drone CI/CD only stuck in exec pipeline)

當我使用 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 Pipe Line 很好。

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

參考解法

方法 1:

First of all it's important to note that the exec pipeline can be used only when Drone is self‑hosted. It is written in the official docs:

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

When Drone is self‑hosted be sure, that:

  1. The exec runner is installed
  2. It is configured properly in its config file (to be able to connect to the Drone server)
  3. And the drone‑runner‑exec service is running

After the service is started, look for its log file and you have to see an info message saying it was able to connect to your Drone server:

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

It's also possible to view the web UI (Dashboard) of the running service if you enable it.

So if you see it can poll your server, then your exec pipeline should run as expected.

(by Fush1szegheo)

參考文件

  1. Drone CI/CD only stuck in exec pipeline (CC BY‑SA 2.5/3.0/4.0)

#continuous-integration #drone.io






相關問題

持續集成中的數據庫變更管理 (Database change management in continuous integration)

Jenkins 全天運行構建和測試 (Jenkins running builds and tests all day long)

Visual Studio Online Build - Visual Studio SDK 和 Modellng SDK (Visual Studio Online Build - Visual Studio SDK and Modellng SDK)

從長遠來看,在 Hudson 和 CruiseControl 之間進行選擇 (Choosing between Hudson and CruiseControl for the long term)

整合兩個數據集...幫助! (Integrating two datasets... Help!)

Hudson 的替代構建經理 (Alternative build manager to Hudson)

帶 VSS 的 CruiseControl - 檢查所有文件 (CruiseControl with VSS - checks all files)

Team Foundation 服務器上變更集註釋的位置? (Location of changeset comments on a Team Foundation server?)

如果作業被取消,Concourse 會阻止後台進程停止 (Concourse prevent background processes from being stopped if job is canceled)

誰應該編寫 dockerfile、SRE 或開發人員? (Who should write the dockerfile, SRE or developer?)

Drone CI/CD 只停留在 exec 管道中 (Drone CI/CD only stuck in exec pipeline)

gitlab-ci:排除來自特定分支的合併請求 (gitlab-ci: exclude merge requests from specific branch)







留言討論