Drone builds until time out (60 minutes)

I use Gitea to test webhook, and successfully send a push event to Drone, but Drone builds until time out.


  1. My .drone.yml file:
kind: pipeline
type: exec
name: default

  os: linux
  arch: amd64

  - name: deploy
      - sh /projects/ops/scripts/yapi.sh
  1. My shell script:
...some print scripts, not important...

nohup java -jar /opt/yapi/target/yapi-0.0.1-SNAPSHOT.jar  > /tmp/yapi.log &

All scripts in shell is executed. I guess nohup or & result in this.
Could you tell me how to deal with shell scripts when using a .sh file?
What is the condition for determining the end of the builds?

drone converts your yaml into a shell script that looks something like this:


sh /projects/ops/scripts/yapi.sh

the pipeline completes when the shell script exits. If the pipeline does not exit, it would indicate the shell script is hanging. It is possible to background a process and still hang the shell.

for example, this shell script will hang indefinitely:


python -m SimpleHTTPServer 8000 &
echo started
exit 0

there is also a stackoverflow topic that addresses this same situtation:

1 Like

Thanks, Brad. I have solved this problem. :+1:t2: