cookiecutter-django icon indicating copy to clipboard operation
cookiecutter-django copied to clipboard

Add support for drone.io

Open cdvv7788 opened this issue 5 years ago • 6 comments

Description

Drone.io support built-in Add a .drone.yml file that allows projects to be tested/built using drone.io

Rationale

There are options for several areas of the project. Why not add some more flavor to the CI/CD options? Drone is very nice, from what I have tested. Also, it is open source, unlike most solutions out there. This makes it a candidate for baseline support.

Use case(s) / visualization(s)

Same as travis, actually. Adding some more options to people who uses other tools. This could be selected at install time.

cdvv7788 avatar May 28 '19 20:05 cdvv7788

Sure, feel free to send a pull request. I've heard of it, but I have no experience with this CI, I hope others may help to get the change reviewed... It sounds like it would be all in one config file so I don't mind having this.

browniebroke avatar May 29 '19 13:05 browniebroke

Yes, it just requires adding a single file to the repo. The installer should ask for the option (travis, drone)? Or just add them both?

cdvv7788 avatar May 29 '19 13:05 cdvv7788

Currently it asks for Travis Y/N so this could be altered to choose a CI: Travis/Drone/None

browniebroke avatar May 29 '19 13:05 browniebroke

or travis/drone/gitlab...

step21 avatar Jun 26 '19 22:06 step21

Since the project is using GitHub Actions now is this still relevant?

shywn-mrk avatar Aug 12 '21 09:08 shywn-mrk

Since the project is using GitHub Actions now is this still relevant?

Probably, since ppl might prefer to use existing ci services instead of GA.

step21 avatar Aug 17 '21 18:08 step21

This is still relavant, the template uses GitHub action, but the generated project might be using a totally different CI. We support a few at the moment:

https://github.com/cookiecutter/cookiecutter-django/blob/3bca38c78d77ecdd9b1ae9af52b373c4277a9c1a/cookiecutter.json#L57-L62

I'm open to add this to the existing option, assuming it's still a single file. Caveat: I've never used drone, so I can't do it... @cdvv7788 @shywn-mrk @step21 are you interested to contribute?

browniebroke avatar Jan 30 '23 23:01 browniebroke

@browniebroke Yes I'm willing to contribute. Where can I start?

shywn-mrk avatar May 19 '23 12:05 shywn-mrk

I would recommend reading our contributing guide which explains the specifics of this project.

You can also check the GitHub docs themselves you need some help to use GitHublike for creating a fork or sending a pull request.

Here are the high level changes:

  1. Add the drone config files in the {{cookiecutter.project_slug}} directory
  2. Add a new option for drone CI in cookiecutter.json: https://github.com/cookiecutter/cookiecutter-django/blob/8d64f1749461310b04a2b512184bb0623fb22ba0/cookiecutter.json#L42
  3. Add the new option to the SUPPORTED_COMBINATIONS in tests: https://github.com/cookiecutter/cookiecutter-django/blob/8d64f1749461310b04a2b512184bb0623fb22ba0/tests/test_cookiecutter_generation.py#L45
  4. Make sure the drone config file(s) is/are deleted if another option is selected. We usually do that in the post-generation hooks
  5. Update documentation

Hope that helps

browniebroke avatar May 24 '23 15:05 browniebroke