by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 20 05:53
    @ashwilliams1 banned @matrixbot
  • Oct 18 2019 03:30
    @bradrydzewski banned @vityafx
  • May 07 2019 20:55
    @bradrydzewski banned @izznogooood
Merlin Pong
@MerlinPong
In my case, need to clone extra repo from same git server to build app
Curretly, I was using the oauth token inject into drone file to clone extra repo, but for long-term coding, a non-invasive way will make benifit
Athreya Patel
@athreyapatel
Hi everyone, is there a way to enable drone without a git application.
2 replies
ashafatef
@ashafatef
Hi everyone , can you exaplain or guid me to build and publish image to digitalocean registery
Joonas Lehtimäki
@jlehtimaki
So how can I use this: http://plugins.drone.io/drone-plugins/drone-git in my pipeline? I want to clone another repository
Brad Rydzewski
@bradrydzewski
@jlehtimaki that plugin is intended for internal use only. It cannot be configured to clone third party repositories ad-hoc.
if you need to clone a third party repository, you can add a step to your pipeline like this:
steps:
- name: pull
  image: alpine/git
  commands:
  - git clone https://github.com/octocat/hello-world.git .
Joonas Lehtimäki
@jlehtimaki
Will that use the configured GIT tokens which are used by Drone?
Chris Zehner
@cbzehner

I have a pretty basic question, right now I have a single drone.yaml file for managing my CI pipeline, it starts with

kind: pipeline
name: default

and has 91 steps. I'd like to split these up into separate files for maintainability but I haven't see any examples of that -- is it possible to compose yaml files in the drone configs or define a pipeline which has other pipelines as dependents?

Don
@donny-dont
@cbzehner it really depends on you here. Drone does support YAML anchors so that can be used to keep things more DRY. Drone supports https://jsonnet.org/ which can be used to make things DRYer. You can also go with Starlark which is basically a subset of Python https://docs.bazel.build/versions/master/skylark/language.html
you can split up steps into different pipelines and have those depend on each other
its really whatever you think logically fits your use case
Chris Zehner
@cbzehner
Thanks @donny-dont . Do you know where I could find examples of multi-pipeline setups?
Don
@donny-dont
the drone-plugins org has multiple examples of them but theyre in starlark https://github.com/drone-plugins/drone-downstream/blob/master/.drone.star
in this case theres a separate testing pipeline then a docker image built for each different platform
stekole
@stekole
does anyone see issues pulling images on their pipelines - slow slow slow to docker-hub or the library/* ? We have seen issues before(and currently) pulling images down, they all of a sudden go to a crawlllll
7 replies
Jim Nicholson
@thejimnicholson

When I "test delivery" from gitea to drone, I get this response:

{"message":"Invalid webhook signature"}

2 replies
Bowser
@Bowser1704
When I "test delivery" from gogs to drone, I get this response:
{"message": "Cannot find repository"}
But i can see my repository in drone homepage.
Andrew
@akoidan

Hello guys. Could you please help me? I'm trying to setup droneci with docker pipeline on RPI arm64.

.env

DRONE_GITHUB_CLIENT_ID=XXXXX
DRONE_GITHUB_CLIENT_SECRET=XXXXXXXXXX
DRONE_RPC_SECRET=XXXXXXXXXXXXXXXXXXXX
DRONE_SERVER_HOST=drone.pychat.org
DRONE_SERVER_PROTO=http
DRONE_USER_CREATE=username:akoidan,admin:true
DRONE_RPC_HOST=drone
DRONE_RPC_PROTO=http
DRONE_RUNNER_CAPACITY=2
DRONE_RUNNER_NAME=drone-runner-1
DRONE_LOGS_DEBUG=true
DRONE_LOGS_TRACE=true
DRONE_RUNNER_LABELS=runner:rpi

docker-compose.yml

version: '3'
services:
  drone:
    image: drone/drone:1
    networks:
      - rpc
    volumes:
      - /var/lib/drone:/data
    ports:
      - 8066:80
    env_file:
      - ./.env

  runner:
    image: drone/drone-runner-docker:1
    networks:
      - rpc
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    env_file:
      - ./.env
networks:
  rpc:

.drone.yml

---
kind: pipeline
type: docker
name: default


platform:
  os: linux
  arch: arm64

node:
  runner: drone-runner-1

steps:
  - name: greeting
    commands:
      - echo hello world
trigger:
  event:
    exclude:
      - pull_request

logs

drone_1   | {"arch":"arm64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-09-29T16:34:09Z","type":"docker","variant":""}
drone_1   | {"arch":"arm64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-09-29T16:34:09Z","type":"docker","variant":""}
drone_1   | {"arch":"arm64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2020-09-29T16:34:39Z","type":"docker","variant":""}
runner_1  | time="2020-09-29T16:34:39Z" level=trace msg="http: no content returned: re-connect and re-try"

But I the task is always in pending status

image.png

p.s. The drone is served via HTTP, but the UI is accessible via https thought proxy nginx + SSL above

Brad Rydzewski
@bradrydzewski
The node section defines a list of key / value labels that are used to assign a pipeline to a node. The runner must match these key / value labels. In your example, DRONE_RUNNER_LABELS is being set to runner:rpi but in your yaml you set runner:drone-runner-1. This mismatch is the reason the pipeline is not being assigned, since the pipeline does not match the runner labels.
Andrew
@akoidan
@bradrydzewski thank you for the response. I removed the runner. so it wouldn't mislead you. I still get the stuck build, I attached all the info in the post https://discourse.drone.io/t/tasks-are-always-in-default-pending-status/8093
Brad Rydzewski
@bradrydzewski
@akoidan the problem is that your yaml and runner both define different labels
I posted to the discourse forum to show how you need to fix your yaml
Andrew
@akoidan
@bradrydzewski that was only for test. I removed the label as you posted, it didn't help as I tried w/o it as well
duncan-small
@duncan-small
Hey, I was wondering if there is a way to retrieve the DRONE_SERVER and DRONE_TOKEN from a drone instance via the api
5 replies
Andrew
@akoidan
@bradrydzewski as I understand lables are not the MUST things for build to work. So I've removed them everywhere now
Brad Rydzewski
@bradrydzewski
the API response you pasted still lists the labels:
         "labels":{
            "runner":"rpi"
         }
Andrew
@akoidan

hm... Do I need to purge the volume ?
where did those labels come from? I don't have them in drone.yml file

ok let me check again

Brad Rydzewski
@bradrydzewski
they come from the yaml
you can see them in your yaml at akoidan/drone-test@2b1980c
Andrew
@akoidan
@bradrydzewski omg. Yeah, thanks you so much. So many things went wrong from architecture and etc. It works now

Btw can I specify multiple architectures? e.g. My build works on both amd64 and arm64. But if I don't set the platform in the yaml it would not work on arm?

https://discourse.drone.io/t/builds-are-stuck-in-pending-status/4437

Undefined Platform when using Arm or Arm64
Brad Rydzewski
@bradrydzewski
if you do not set a platform, it defaults to amd64
Andrew
@akoidan
@bradrydzewski you're correct but it doesn't answer my question. I want my config to be able to run on 2 architectures arm64 and amd64.
If I set the platform it would not run on the architecture I didn't specify.
If I don't set the platform it would not run on arm64 and it defaults to amd64 as you said
Don
@donny-dont
each pipeline would have a different architecture
if you want an example of that the drone-plugins repo has multiple ones
amd64 arm and windows variants
Brad Rydzewski
@bradrydzewski
Robert Kaussow
@xoxys
is it possible to have a static docker runner host configured and using the autoscaler at the same time?
5 replies
Don
@donny-dont
yea
why wouldnt it be @xoxys
you can also use labels if you want some machine to always handle certain tasks and everything else going to the autoscaler
Robert Kaussow
@xoxys
Was just not sure if I missed something 🙂 thanks
Don
@donny-dont
you could of course end up in a situation where your one machine thats just hanging grabs the build task immediately after your autoscaler starts spinning things up
so by the time its up and running theres no work for it
you can also set a minimum number of hosts in the autoscaler
Jason Yu
@jason-s-yu
Are programs running on detached steps visible by other steps in a docker runner? I.e. i have a python service running detached while I run tests in a different step?
1 reply
rocdove
@rocdove
fatal: unable to access 'https://xxxxx/drone_test.git/': SSL certificate problem: unable to get local issuer certificate