3

io team and lovers.

I tested Drone.io in a locally way and I like it.

Is there a way to use Drone.io locally without pushing to a repository?.

I would like to use it on developer environments, that means the developers can test their code before pushing to the repository.

It's possible to do that?

Eddy Hernandez
  • 5,150
  • 1
  • 24
  • 31

2 Answers2

7

You can run:

drone exec

It requires the drone cli tools.

Webwoman
  • 10,196
  • 12
  • 43
  • 87
Alex Smith
  • 354
  • 2
  • 13
  • _"Drone gives you the ability to run your build locally, on your personal computer, without a Drone server"_ I do not need to get drone.io running locally. – Eddy Hernandez May 25 '16 at 14:19
  • It's not the full drone server, just enough tooling to run your drone build locally. It can use your secrets and an optional SSH key if needed. This doesn't run any deploy or hook steps, just the build. – Alex Smith May 25 '16 at 14:22
-1

Though you can run drone exec to run the build locally it does not make sense to do so and not having a CI server.

The nature of a CI system to serve as quality barrier that does not rely on humans to avoid bugs slipping into your master branch and production software. This quality barrier is automated into a build pipeline and does not rely on developers explicitly calling it. Furthermore, developers should not be able to merge any code into master if the build pipeline is not successful.

That said, if you expect developers will run the build pipeline locally and then push their code you are doomed to fail, because they are humans and at some point they won't run the pipeline and still push the code.

My suggestions, use trunk based development, enforce build pipeline execution before every merge.

Daniel Cerecedo
  • 6,071
  • 4
  • 38
  • 51
  • 3
    ...and then nobody can run *any* of the build pipeline until they roll it all together into a pull request, leading to a repository full of "do not merge, just needed to run tests" PRs because people wanted faster feedback before their feature was ready. The quality barrier is absolutely important, but having worked with code whose verification process could only be triggered by PR, I can say it's incredibly slow, inconvenient, and bothersome to be unable to run your verification locally. – meustrus Jun 28 '19 at 15:13