Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Feb 20 05:53
    @ashwilliams1 banned @matrixbot
  • Oct 18 2019 03:30
    @bradrydzewski banned @vityafx
  • May 07 2019 20:55
    @bradrydzewski banned @izznogooood
Integration test cases are failing randomly in Drone build but passing in locally. may I know the where to start basic troubleshoot. We are using API calls as well.
Danilo Silva
Hi guys, I'have an issue with mounting docker.socks in a plugins/ecr step
I would like to build docker image, push to ecr, and keep them into the machine, because further steps use that images and I want to avoid to pull from ecr because I build them 1 seconds ago
so I tried this:

  - name: publish-staging-builder
    image: plugins/ecr
      - name: dockersock
        path: /var/run/docker.sock
      region: eu-west-1
        - staging-builder
      dockerfile: Dockerfile
      purge: false

  - name: dockersock
      path: /var/run/docker.sock
Danilo Silva
I mount the /var/run/docker.sock and added the purge: false
the purge: false settings works as expected in fact there is no trace in the log of docker rmi, etc.
but the images are not keeped, and if I try docker image ls in the host the is no trace of built images
Hi, I'm starting containers via docker-compose from within a docker container, using a mounted docker socket. This means that the docker containers are spawned on the host, which means that I can't 'just mount' the git cloned dir (/drone/src/). Yet, I do want this dir mounted within a docker-compose container. Is this dir also available on the host? Can I do this using volumes? I'm not sure. Any help would be appreciated.
@3to1null if you find yourself mounting the host machine docker socket to run docker-compose, you should probably consider using exec pipelines instead of docker pipelines. See https://docs.drone.io/pipeline/exec/overview/
docker pipelines and docker-compose are both orchestration systems and share many of the same features, and therefore conflict with one-another as opposed to complement one-another. So in this situation I recommend exec pipelines instead
@ashwilliams1 Thanks. I will have a look.
@ashwilliams1 How does this work though, if drone itself is installed via docker-compose. Is the 'host' where docker exec runs the underlying VPS, or the drone container?
@3to1null Drone has different types of pipelines (docker, exec, kuberntes, ssh, etc). You install a different runner for each pipeline type. The exec runner is distributed as a binary and does not run inside docker.
the exec pipeline is not related to docker exec. An exec pipeline executes your shell commands directly on the host. No docker is involved.
Does drone block a build if a labelled runner doesnt exist? Or does it proceed any available runner?
The situation is, the runner might be offline many times a day, so I dont want builds redirected to another runner.
Thomas Boerger
Than the build will stay in pending state
hey guys, do someone here knows how can i pass a file to template field in drone/slack plugin? currently using this configuration - slack output is the file path instead file content
- name: slack
  image: plugins/slack
    webhook: https://hooks.slack.com/services/xxxxx/xxxxxx/xxxxxxx
    channel: automation
    username: drone
    template: /drone/src/slack_message.txt
    event: pull_request
    - failure
    - success

A remote docker runner isnt able to connect to my drone instance.

The drone instance is behind nginx and has TLS v1.3 with HTTP/2. Hope this helps.

time="2020-05-21T04:29:15Z" level=error msg="cannot ping the remote server" error="Post https://builds.baalajimaestro.me/rpc/v2/ping: remote error: tls: protocol version not supported"

If it does matter, drone is just using plain http, I used nginx for the certs.
@baalajimaestro sounds like an nginx configuration issue or some other configuration issue.
remote error: tls: protocol version not supported
@ashwilliams1 Mostly a no. The drone site is perfectly accessible.
you need to configured nginx to accept TLS 1.2
TLS 1.3 support is opt-in in Go
according to the Go documentation, you could enable by passing GODEBUG=tls13=1 to the runner
Vikash Singh
Hi All ,I am trying to copy jar from drone to another server via appleboy/drone-scp image. I am ble to copy the jar but it will come with folder which I have mentioned in target.
Can some one assist me on it just copy the jar not folder.
Hi @vaibhav-jain @bradrydzewski , any limitation in how many parallel pipelines are supported. I'm trying to find the most resourceful way parallelize test across a few ephemeral containers?
Dmitriy Lushnikov
Hi guys, how can I take image digest from publish step and use it in deploy step?
  - name: publish
    image: plugins/docker
      registry: my.registry.com
      username: username
      password: password
      repo: my.registry.com/app
        - latest

  - name: deploy
    image: my-image/drone-deploy
      namespace: dev
      repo: my.registry.com/app
      deployment: app
      container: app
Robert Lippens

EDIT: oops went to edit my message and chose delete instead :(. @bradrydzewski - builds for one repo are getting stuck in pending. We are using autoscaler, removed all errored nodes, builds still stuck in pending. Database errors show the following error for every one of the builds in the repo:
{"build.id":25741,"build.number":16,"error":"pq: value too long for type character varying(500)","level":"warning","msg":"manager: cannot update the stage","repo.id":475,"stage.id":100684,"time":"2020-05-21T17:49:48Z"}

Seems to be some sort of postgres issue. I noticed several columns have a varchar(500) type, not sure what the real error is since it seems like drone can't cram it into the field due to the varchar limit.

2) Bigger issue: the last few days we've had issues with the autoscaler, and the server not assigning jobs to the autoscaled instances. This is sometimes half an hour after a new instance has come online. Builds will seemingly get stuck in pending until a new instance spins up, even if there is enough server capacity. I did notice 4/5 of our instances at one point were in an error state, one of which was months old and never got cleaned up. Does this cleanup have to occur manually if DRONE_REAPER_ENABLED is not configured? Or should these errored instances still go away automatically after some interval?

@Lucretius have you seen https://discourse.drone.io/t/builds-are-stuck-in-pending-status/4437. I believe it documents all known root causes for a build stuck in pending.
In terms of postgres, have you checked the postgres database logs? they might provide some more insight.
Robert Lippens
I've seen that doc before yes, was directed there when we had some pending builds a while back. As for the postgres database logs, the only additional information they show is the PG statement that is causing the error (without the actual values)
UPDATE stages
stage_status = $1
,stage_error = $2
,stage_errignore = $3
,stage_exit_code = $4
,stage_os = $5
,stage_arch = $6
,stage_variant = $7
,stage_kernel = $8
,stage_machine = $9
,stage_started = $10
,stage_stopped = $11
,stage_created = $12
,stage_updated = $13
,stage_version = $14
,stage_on_success = $15
,stage_on_failure = $16
,stage_depends_on = $17
,stage_labels = $18
WHERE stage_id = $19
AND stage_version = $20
Robert Lippens
ah this appears to be the issue
https://docs.drone.io/pipeline/environment/syntax/#per-pipeline ---- this syntax does not seem to work and leaves things in a pending state forever. I moved it into my steps and everything is working again
perhaps you have an old version of the autoscaler, or you have it configured to install old versions of the runner? The global environment syntax is recent.
Robert Lippens
drone autoscaler should be the latest, i didnt tag the container and we recently rebuilt it
let me run container inspect real fast, see if there are any flags that stick out
Robert Lippens

drone/autoscaler latest 5004e5938d3a 6 days ago 39.8MB

is what i see in my docker images, nothing out of the ordinary as far as the autoscaler config flags, I dont think there is even a way to specify a different version of a runner right?

yes, one can specify a different runner version
I only ask because the global environment section definitely works. There was a test here drone/hello-world@3c8d0de and results at https://cloud.drone.io/drone/hello-world/121
Robert Lippens
ill try and configure it again, trying to match that sample config you just sent
Robert Lippens

so i have:

kind: pipeline
type: docker
name: default

        from_secret: secret_1
    env_1: value_1

- name: Terraform plan
  image: hashicorp/terraform:light
  - terraform init
  - terraform validate
  - terraform plan

with the recent autoscaler (as of 6 days ago, I did not specify DRONE_AGENT_IMAGE) and the builds get stuck pending for eternity, and that postgres error shows up in the logs.

our drone server is currently 1.6.5
I wonder, that example tested one type of secret but not the from_secret ones.. lemme try removing those
I just removed the from_secret ones, and the build runs. The from_secret syntax appears to be causing the issue.
yes, the global environment section does not support from_secret yet
Is drone/windows alive? I asked a question there but now I see that the last message was 18 days ago...
would be nice, if someone could help