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
you are all good man
who can help me
my pipeline never triggered to build
I use the drone/charts to set up the drone, and the drone-runner-kube on k8s, but the pipeline never triggered


kind: pipeline
type: kubernetes
name: default
- name: greeting
  image: alpine
  - echo world
  - push
Is there anyone can help me, good luck with you all the time!
@dschmidt Hi!
Have a question. Is there an option to add default tasks to all repositories and runs in DroneCI? I'd like to use http://plugins.drone.io/masci/drone-datadog/ globally. Any idea how to solve that?
2 replies
Jozsef Kiraly

Hi all!

I'm facing a weird situation. I have a working flow for building an Android app, which needs to be optimised a bit. The main focus is on a step that grabs the output of various unit test coverage reports, etc., and uploads them to a private server. The step works, but takes a very long time since every file is uploaded one by one.

This step is not crucial to the flow itself, so failures are ignored (it happens from time to time due to the target server not being available). However, it also blocks other tasks from running, thus the flow becomes incredibly long (the actual unit test and build steps take around 3-4 minutes, this upload task can take up to 10 minutes). I wanted to make this step run in the background so that other steps can follow (which do not depend on the results of this upload step), cutting down time needed for the GitHub verification (so e.g. the upload task can be still running, but the PR in question can be merged before it finishes). The closest option I could find for this is detaching the step from the flow, which works, except... The detached step gets killed as soon as the rest of the flow is finished. As we are not guaranteed to have uploaded all the files at that point, this means my upload task gets broken midway through the uploads.

Is there a way for Drone to wait for a detached step to be finished before finishing the flow and killing said detached step? Or should I just make a separate pipeline for the uploads?

2 replies

i set up the drone server and a drone runner on my machine and connected it to bitbucket - this works quite well out of the box.
Now I am facing a problem and I am really struggeling: I build a costum docker image which has some domain specific software in it (locally). I pass the name of the image in the pipeline:

 -  name: name
- image: my_costum_image

now if I commit something everyhting works - great.
Additionally I need to change the MAC adress of the pipeline cotainer (not the runner).
I tried to just add some additional NIC, but docker does not let me do that at runtimee due to NET_ADMIN and I do not understand how to grad the container the NET_ADMIN permission. I also tried to add:


to my drone-agent / the runner, but I am still not able to execture ip link add link eth0 (error: RTNETLINK answers: Operation not permitted)

I am able to reproduce this error locally without drone by starting my image with docker and exec a bash. I am also able to solve the problem locally by --add-cap=NET_ADMIN on the exec command.
Is there a possibility to grant NET_ADMIN to the pipeline container or any other suggestions on how to solve the problem?

2 replies
Jem Altieri

Hi there all. I'm using the drone slack plugin, and trying to neaten up the messages. I'm invoking like this:

- name: notify slack of result
   image: plugins/slack
     from_secret: slack_deploy_notifications_webhook
   channel: deploy-notifications
   template: >
          *{{#success build.status}}{{ else }}{{/success}} {{ uppercasefirst build.status }}: Build #{{ build.number }}* (type: `{{ build.event }}`)\n
          further messages\n

but the \n s are not resulting in actual newlines in the message, they're instead showing up in the text. how do i get some newlines in my slack messages?

16 replies
Sriram Maddirala
Hey I was looking into whether it's possible to setup my drone.yml so that whenever a commit is made to a fork of my repo, drone pushes a build to my docker registry. Example repo : team/product. Example fork: user/product
I wanted to make custom workdir in pipeline, is it possible?
(To make plugin/docker inside in one specific folder)
Austin Lee
try run cd dir/ command before plugin/docker step?
I think that makes plugin not to start (building step)
Austin Lee
or try to use context option in plugin/docker?
Contex not working there
my dockerfile trying add file outside of contex folder
Austin Lee
So why you want to custom workdir? may be root directory is a good anwser. Or you can add step to copy all need files to a new folder then set context option to it.
Austin Lee
ADD electron-packager/electron-packager.sh /bin/

modify to

ADD electron-packager.sh /bin/

then set context value to electron-packager.sh. I think it can work well.

was not working
I had changed this after I wroted here
Austin Lee
what's error message output?
somethink like that (i dont have logs)
/src/drone/docker-build.../electron-packager.sh not found
while dockerfile tries the 'add'
Brad Rydzewski

Contex not working there. my dockerfile trying add file outside of contex folder

you can specify a path to both the context and dockerfile

  context: foo/bar
  dockerfile: foo/bar/Dockerfile
I specified
Brad Rydzewski
however, note that Docker will not allow you to add files or folders outside of the context. This is a docker limitation, not a Drone limitation
I don't want to add files outside of the context
my context and my dockerfile (without .git)
is in subdir
Austin Lee
let me try it with drone cloud, please wait for a moment
Austin Lee
ADD electron-packager/electron-packager.sh /bin/

modify to

ADD electron-packager.sh /bin/

then set context value to electron-packager.sh. I think it can work well.

I try it and it works done. https://cloud.drone.io/lizheming/drone-plugins/4/1/3 here is build log. Notice you also set context: electron-packager in .drone.yml. and I got an error becase an invalid repo tag, so I try to just create latest tag. Here is the last yaml https://github.com/lizheming/drone-plugins/blob/master/.drone.yml @mlunax

Error parsing reference: "******/drone-electron-packager:refs/heads/master" is not a valid repository/tag: invalid reference format
thats the step before
ignore it or delete it?
wait thats stupid
that didn't work for me
Okay, now it works. I dunno why.
I have second question:
I wanted to use docker image builded in previous step to publish after I use promotion.
I am about to build some legacy .NET apps and would like to build them using Windows containers. The docs stated that "Support for Docker pipelines on Windows is experimental and is not recommended for production use at this time." Is there a roadmap or timeline where this will be production ready?
7 replies
I want to integrate sonarqube with drone ci/cd so that I can analysis static code. How can I achieve the integration of drone and Sonarqube ?
3 replies
I have used this
but I am getting below error.
==> Code Analysis Result: INFO: Scanner configuration file: /bin/sonar-scanner-
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner
INFO: Java 1.8.0_212 IcedTea (64-bit)
INFO: Linux 4.15.0-108-generic amd64
INFO: User cache: /root/.sonar/cache
ERROR: SonarQube server [] can not be reached
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.649s
INFO: Final Memory: 6M/481M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
... 7 more
Caused by: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found
at org.sonarsource.scanner.api.internal.shaded.okhttp.HttpUrl$Builder.parse(HttpUrl.java:1332)
at org.sonarsource.scanner.api.internal.shaded.okhttp.HttpUrl.get(HttpUrl.java:917)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Request$Builder.url(Request.java:165)
at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:109)
at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:98)
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
... 10 more
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
1 reply
my drone ci build failed, with error "Killed (cancelled)" from web console, is there any default timeout setting there?
2 replies
Michael Slizenko

Hi. Can anyone tell me how to write env variable to a file? I try this, but it doensn't work.

echo $KUBE_CONFIG > ~/.kube/config
kubectl apply -f ./deploy/$APP/$APP_ENV.yaml

Fails with error: error loading config file "/.kube/config": yaml: mapping values are not allowed in this context

3 replies
Daniel Grove
There are no docs and the discussion threads all make references to things that do not work at all for service accounts in kubernetes pipelines. I've created a PR to add some clear documentation on this. drone/docs#426
Begley Brothers (Development)
We are trying to script setup of drone-server with gitea. We can script the gitea provision of an app id and secret. However the Drone server setup has us stumped. Curl to 80 on the droneserver indicates javascript is required. Have we missed something obvious? All the blog posts we see assume the drone server setup is user driven rather than script driven.
12 replies
Hi, external environment variable cannot be used in image: section (as a tag), right?
5 replies