Drone.io build locally without pushing to the repo

对着背影说爱祢 提交于 2019-12-14 02:12:19

问题


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?


回答1:


You can run:

drone exec

It requires the drone cli tools.




回答2:


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.



来源:https://stackoverflow.com/questions/36987332/drone-io-build-locally-without-pushing-to-the-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!