Pipeline fails with “clone: skipped” (Docker stack)

See [solved] Builds keep failing: "clone: skipped" - #9 by bradrydzewski

1 Like

Thank you, but this is not the case and the contents of the file are reflected in the Drone UI (name of the pipeline, steps, etc.), so this error message appears to be misleading.

Thank you very much, the issue is gone! I think it was indeed mostly the use of drone/drone:latest, which was a silly error and entirely my fault because I didn’t follow the documentation, apologies.

For future reference, I—

  1. specified the version for the server and client Docker images to :1,
  2. added the environment variable DOCKER_API_VERSION: 1.39 to both due to another error I got, and
  3. changed the network to an attachable and external one in order to allow the Drone runner to attach its own containers to it.

This issue is thus solved, thank you for this excellent software!

Hi All, I have the same problem: Build - clone: skipped

Drone stack:

version: "3.7"

services:
  drone-server:
    image: drone/drone:2.0.0
    #image: ruanbekker/drone-server:basic-auth-1.2.1
    container_name: drone-server
    hostname: drone-server
    ports:
      - 9080
      - 9000
    volumes:
      - /volume2/docker/drone-server:/var/lib/drone/
    restart: always
    network_mode: host
    environment:
      - DRONE_OPEN=true
      - DRONE_GITEA=true
      - DRONE_DEBUG=true
      - DRONE_ADMIN=apl
      - DRONE_USER_CREATE=username:apl,admin,drone:true
      - DRONE_SERVER_PORT=:8989
      - DRONE_DATABASE_DRIVER=mysql
      - DRONE_DATABASE_DATASOURCE=root:.dc@9Jj@7YfrjoPVyHRekuMW7hw@tcp(127.0.0.1:3306)/drone?parseTime=true
      - DRONE_GIT_ALWAYS_AUTH=false
      - DRONE_GITEA_SERVER=https://git.internal.me
      - DRONE_GITEA_CLIENT_ID=5fe862f1-ace5-49a1-9294-9da9c84078cd
      - DRONE_GITEA_CLIENT_SECRET=D2O4m14M5ickBX5nC1bhrKrWWhmWU-NkXLDuINCY198=
      - DRONE_RPC_SECRET=9c3921e3e748aff725d2e16ef31fbc42
      - DRONE_SERVER_HOST=drone.internal.me
      - DRONE_HOST=drone-server
      - DRONE_SERVER_PROTO=https
      - DRONE_TLS_AUTOCERT=false
      - DRONE_AGENTS_ENABLED=true
      - DRONE_LOGS_DEBUG=true
      - DRONE_LOGS_TEXT=true
      - DRONE_LOGS_PRETTY=true
  drone-agent:
    image: drone/drone-runner-docker
    #image: ruanbekker/drone-agent:basic-auth-1.2.1
    container_name: drone-agent
    hostname: drone-agent
    command: agent
    restart: always
    network_mode: host
    ports:
      - 8939:8939
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /volume2/docker/drone-agent:/data
    environment:
      - DRONE_HTTP_BIND=:8939
      - DRONE_RPC_HOST=drone.internal.me:8989
      - DRONE_RPC_SECRET=9c3921e3e748aff725d2e16ef31fbc42
      - DRONE_RUNNER_CAPACITY=4
      - DRONE_RUNNER_NAME=drone-agent
      - DRONE_RPC_PROTO=http
      - DRONE_DEBUG=true
      - DRONE_LOGS_DEBUG=true
      - DRONE_LOGS_TEXT=true
      - DRONE_LOGS_PRETTY=true

.drone.yml

kind: pipeline
type: docker
os: linux
arch: amd64
name: Build

environment:
  release_type: alpha
  DPKG_FRONTEND: noninteractive
trigger:
  branch:
    - master

steps:
- name: greeting
  image: alpine
  commands:
  - echo hello
  - echo world

- name: test
  image: alpine
  commands:
  - ls -la
  - mount

Server log:

time="2021-05-21T14:37:16Z" level=debug msg="main: license loaded" build.limit=0 expires="0001-01-01 00:00:00 +0000 UTC" kind=trial repo.limit=0 user.limit=0
time="2021-05-21T14:37:16Z" level=debug msg="bootstrap: create account" admin=false login=apl machine=false token=
time="2021-05-21T14:37:16Z" level=debug msg="bootstrap: updating account" admin=false login=apl machine=false token=
time="2021-05-21T14:37:16Z" level=debug msg="bootstrap: account already up-to-date" admin=false login=apl machine=false token=
time="2021-05-21T14:37:16Z" level=info msg="starting the http server" acme=false host=drone.internal.me port=":8989" proto=https url="https://drone.internal.me"
time="2021-05-21T14:37:16Z" level=info msg="starting the cron scheduler" interval=30m0s
time="2021-05-21T14:37:16Z" level=info msg="starting the zombie build reaper" interval=24h0m0s
time="2021-05-21T14:37:16Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:16Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:16Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:16Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:23Z" level=debug msg="webhook parsed" commit=9680e695ed12d75187c9c7e2ad96ff8a3e9fe5be event=push name=Drone-test namespace=AP
time="2021-05-21T14:37:23Z" level=debug msg="trigger: received" commit=9680e695ed12d75187c9c7e2ad96ff8a3e9fe5be event=push ref=refs/heads/master repo=AP/Drone-test
time="2021-05-21T14:37:23Z" level=debug fields.time="2021-05-21T14:37:23Z" latency=172.008321ms method=POST remote="127.0.0.1:40549" request="/hook?secret=5fSmAwPm5btECtikmYhljtJ94OjuFV8e" request-id=1sql8smNBeVnb2KaxgatztTZFfA
time="2021-05-21T14:37:23Z" level=debug msg="manager: accept stage" machine=drone-agent stage-id=15
time="2021-05-21T14:37:23Z" level=debug msg="manager: stage accepted" machine=drone-agent stage-id=15
time="2021-05-21T14:37:23Z" level=debug msg="manager: fetching stage details" step-id=15
time="2021-05-21T14:37:23Z" level=debug msg="manager: stage is complete. teardown" stage.id=15
time="2021-05-21T14:37:24Z" level=debug msg="manager: build is finished, teardown" build.id=15 build.number=15 repo.id=1 stage.id=15
time="2021-05-21T14:37:24Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:46Z" level=debug msg="manager: context canceled" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:46Z" level=debug msg="manager: context canceled" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:46Z" level=debug msg="manager: context canceled" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:54Z" level=debug msg="manager: context canceled" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:56Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:56Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:37:56Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=
time="2021-05-21T14:38:04Z" level=debug msg="manager: request queue item" arch=amd64 kernel= kind=pipeline os=linux type=docker variant=

Agent log:

time="2021-05-21T14:37:16Z" level=debug msg="successfully pinged the docker daemon"
time="2021-05-21T14:37:16Z" level=info msg="starting the server" addr=":8939"
time="2021-05-21T14:37:16Z" level=info msg="successfully pinged the remote server"
time="2021-05-21T14:37:16Z" level=info msg="polling the remote server" arch=amd64 capacity=4 endpoint="http://drone.internal.me:8989" kind=pipeline os=linux type=docker
time="2021-05-21T14:37:16Z" level=debug msg="poller: request stage from remote server" thread=4
time="2021-05-21T14:37:16Z" level=debug msg="poller: request stage from remote server" thread=1
time="2021-05-21T14:37:16Z" level=debug msg="poller: request stage from remote server" thread=2
time="2021-05-21T14:37:16Z" level=debug msg="poller: request stage from remote server" thread=3
time="2021-05-21T14:37:23Z" level=debug msg="stage received" stage.id=15 stage.name=Build stage.number=1 thread=4
time="2021-05-21T14:37:23Z" level=debug msg="stage accepted" stage.id=15 stage.name=Build stage.number=1 thread=4
time="2021-05-21T14:37:23Z" level=debug msg="stage details fetched" build.id=15 build.number=15 repo.id=1 repo.name=Drone-test repo.namespace=AP stage.id=15 stage.name=Build stage.number=1 thread=4
time="2021-05-21T14:37:23Z" level=debug msg="updated stage to running" build.id=15 build.number=15 repo.id=1 repo.name=Drone-test repo.namespace=AP stage.id=15 stage.name=Build stage.number=1 thread=4
time="2021-05-21T14:37:24Z" level=debug msg="destroying the pipeline environment" build.id=15 build.number=15 repo.id=1 repo.name=Drone-test repo.namespace=AP stage.id=15 stage.name=Build stage.number=1 thread=4
time="2021-05-21T14:37:24Z" level=debug msg="successfully destroyed the pipeline environment" build.id=15 build.number=15 repo.id=1 repo.name=Drone-test repo.namespace=AP stage.id=15 stage.name=Build stage.number=1 thread=4
time="2021-05-21T14:37:24Z" level=debug msg="updated stage to complete" build.id=15 build.number=15 duration=0 repo.id=1 repo.name=Drone-test repo.namespace=AP stage.id=15 stage.name=Build stage.number=1 thread=4
time="2021-05-21T14:37:24Z" level=debug msg="poller: request stage from remote server" thread=4
time="2021-05-21T14:37:24Z" level=debug msg="done listening for cancellations" build.id=15 build.number=15 repo.id=1 repo.name=Drone-test repo.namespace=AP stage.id=15 stage.name=Build stage.number=1 thread=4

I think os and arch should be under platform like so:

platform:
  os: linux
  arch: amd64

yes, you are correct. moved it to “Platform”. Simplified pipeline. But it still failing: “Build - clone: skipped”

---
kind: pipeline
type: docker
name: Build

platform:
  os: linux
  arch: amd64

steps:
- name: greeting
  image: alpine
  commands:
  - echo hello world

Are there any errors in the UI, can you get a screen shot of that.
The logs you provided dont have any errors.

  • double check that the .drone.yml file being used is the one expected. ie what is checked into the repo
  • there is a latest image for drone, which is newer than 2.0
  1. whole .drone.yml above. drone file after drone fmt command.
  2. this is drone image 2.0.0.
    Drone server: 834586aa3224 drone/drone:2.0.0
    Drone runner: 77a89b3f84e4 drone/drone-runner-docker
  3. I see no errors in the UI, beside mentioned above.
  4. Repository has:
drwxr-xr-x  12 apl  staff   384 May 24 08:14 .git
-rw-r--r--   1 apl  staff     0 May 20 08:08 Dockerfile
-rw-r--r--   1 apl  staff     0 May 19 20:42 README.md

One of idea was – “empty files, nothing to checkout” – add some strings to Readme and Dockerfile. Result is the same: Build - clone: skipped

so i tried your build file on my drone setup, and it worked. so it isnt that.
On the build page you can see what drone is doing by using the developer console for your web browser and enabling developer tools and clicking on the network tab EG


For when i click on ‘3’ denoting build 3 i can see more info. it might be worth looking there.

option 2
when i had issues connecting to github i used a container with some network tools in it

cat Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get install -y traceroute iputils-ping
ENTRYPOINT /bin/bash

then my .drone.yml looked like

kind: pipeline
name: default
type: docker

clone:
disable: true

steps:

  • name: check network connections
    image: tphoney/traceroute
    pull: if-not-exists
    commands:

Thank you for verification.
but on my setup i have “Clone: skipped”. I’m pretty sure the problem is somewhere between gitea, drone and runner. and i have no idea where and how can identify and solve it. i’m expecting some logs around “cloning” stage, but there is nothing.

Hi aplsms

Could please add the TP_Honey connectivity step before your cloning step and them run your build as debug?

You will be able to perform some network test against the Git.

Error message changed: Build - check network connections: skipped

Pipieline

---
kind: pipeline
type: docker
name: Build

platform:
  os: linux
  arch: amd64

clone:
  disable: true

steps:

- name: check network connections
  image: tphoney/traceroute
  pull: if-not-exists
  commands:
  - env
  - ping git.petrenko.me -w 5
  - traceroute -T -p 443 git.petrenko.me
  - echo "end of test"


- name: greeting
  image: alpine
  commands:
  - echo hello world

I can terminate environment, run it with any debug flags, change any configs – just let me know what I should do,

Do your runners have labels DRONE_RUNNER_LABELS=os:linux,arch:amd64? see > DRONE_RUNNER_LABELS | Drone

actually with my previous comment I was confusing platform and node. That said its worth verifying your runners are drone/drone-runner-docker:linux-arm64

Could please confirm that you are running the runner using the tag [linux-amd64]?

i’ve use this setting: - DRONE_RUNNER_LABELS=os:linux,arch:amd64; then i removed it and remove everything from pipeline.
just add it there, and pipeline is stuck, for ~40 min.

Just in case compose file:

services:
  drone-server:
    image: drone/drone:2.0.0
    container_name: drone-server
    hostname: drone-server
    ports:
      - 9080
      - 9000
    volumes:
      - /volume2/docker/drone-server/:/var/lib/drone/
    restart: always
    network_mode: host
    environment:
      - DRONE_OPEN=true
      - DRONE_GITEA=true
      - DRONE_DEBUG=true
      - DRONE_ADMIN=apl
      - DRONE_USER_CREATE=username:apl,admin,drone:true
      - DRONE_SERVER_PORT=:8989
      - DRONE_DATABASE_DRIVER=mysql
      - DRONE_DATABASE_DATASOURCE=drone:Drone_Password1@tcp(127.0.0.1:3306)/drone?parseTime=true
      - DRONE_GIT_ALWAYS_AUTH=false
      - DRONE_GITEA_SERVER=https://git.internal.me
      - DRONE_GITEA_CLIENT_ID=5fe862f1-ace5-49a1-9294-9da9c84078cd
      - DRONE_GITEA_CLIENT_SECRET=D2O4m14M5ickBX5nC1bhrKrWWhmWU-NkXLDuINCY198=
      - DRONE_RPC_SECRET=9c3921e3e748aff725d2e16ef31fbc42
      - DRONE_SERVER_HOST=drone.internal.me
      - DRONE_HOST=drone-server
      - DRONE_SERVER_PROTO=https
      - DRONE_TLS_AUTOCERT=false
      - DRONE_AGENTS_ENABLED=true
      - DRONE_LOGS_DEBUG=true
      - DRONE_LOGS_TEXT=true
      - DRONE_LOGS_PRETTY=true
      - DRONE_LOGS_TRACE=true

  drone-agent:
    image: drone/drone-runner-docker
    container_name: drone-agent
    hostname: drone-agent
    command: agent
    restart: always
    network_mode: host
    ports:
      - 8939:8939
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /volume2/docker/drone-agent/:/data/
    environment:
      - DRONE_HTTP_BIND=:8939
      - DRONE_RPC_HOST=drone.internal.me:8989
      - DRONE_RPC_SECRET=9c3921e3e748aff725d2e16ef31fbc42
      - DRONE_RUNNER_CAPACITY=1
      - DRONE_RUNNER_NAME=drone-agent
      - DRONE_RUNNER_LABELS=os:linux,arch:amd64
      - DRONE_RPC_PROTO=http
      - DRONE_DEBUG=true
      - DRONE_LOGS_DEBUG=true
      - DRONE_LOGS_TEXT=true
      - DRONE_LOGS_PRETTY=true
      - DRONE_LOGS_TRACE=true

Can you try changing drone/drone-runner-docker to drone/drone-runner-docker:linux-amd64?

As HC89 solved the problem,

Could you please follow his steps?

  1. specify the version for the server and client Docker images to :1 ,
    (ONLY if you face an error without this)2. added the environment variable DOCKER_API_VERSION: 1.39
  2. changed the network to an attachable and external one in order to allow the Drone runner to attach its own containers to it.

An example of an attachable and external network.

services:
  nginx:
    image: nginx
    networks:
    - core-infra
networks:
  core-infra:
    external: true

Fixed after upgrade docker to latest version.

2 Likes

For clone:skipped for me (win64 exec runners) was because invalid step name in “depends_on” section, but no information in logs even if trace enabled. Spend hours to find that due to poor logs.

1 Like