Drone.io build locally without pushing to the repo

2019-07-21 11:50发布

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?

2条回答
孤傲高冷的网名
2楼-- · 2019-07-21 12:21

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.

查看更多
别忘想泡老子
3楼-- · 2019-07-21 12:31

You can run:

drone exec

It requires the drone cli tools.

查看更多
登录 后发表回答