mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-14 17:04:53 +03:00
Add overall config for drone.io support
This commit is contained in:
parent
ee31a1eb63
commit
ebe3e0394c
|
@ -39,7 +39,7 @@
|
||||||
"use_sentry": "n",
|
"use_sentry": "n",
|
||||||
"use_whitenoise": "n",
|
"use_whitenoise": "n",
|
||||||
"use_heroku": "n",
|
"use_heroku": "n",
|
||||||
"ci_tool": ["None", "Travis", "Gitlab", "Github"],
|
"ci_tool": ["None", "Travis", "Gitlab", "Github", "Drone"],
|
||||||
"keep_local_envs_in_vcs": "y",
|
"keep_local_envs_in_vcs": "y",
|
||||||
"debug": "n"
|
"debug": "n"
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,6 +238,8 @@ def remove_dotgitlabciyml_file():
|
||||||
def remove_dotgithub_folder():
|
def remove_dotgithub_folder():
|
||||||
shutil.rmtree(".github")
|
shutil.rmtree(".github")
|
||||||
|
|
||||||
|
def remove_dotdrone_file():
|
||||||
|
os.remove(".drone.yml")
|
||||||
|
|
||||||
def generate_random_string(length, using_digits=False, using_ascii_letters=False, using_punctuation=False):
|
def generate_random_string(length, using_digits=False, using_ascii_letters=False, using_punctuation=False):
|
||||||
"""
|
"""
|
||||||
|
@ -494,6 +496,9 @@ def main():
|
||||||
if "{{ cookiecutter.ci_tool }}" != "Github":
|
if "{{ cookiecutter.ci_tool }}" != "Github":
|
||||||
remove_dotgithub_folder()
|
remove_dotgithub_folder()
|
||||||
|
|
||||||
|
if "{{ cookiecutter.ci_tool }}" != "Drone":
|
||||||
|
remove_dotdrone_file()
|
||||||
|
|
||||||
if "{{ cookiecutter.use_drf }}".lower() == "n":
|
if "{{ cookiecutter.use_drf }}".lower() == "n":
|
||||||
remove_drf_starter_files()
|
remove_drf_starter_files()
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ SUPPORTED_COMBINATIONS = [
|
||||||
{"ci_tool": "Travis"},
|
{"ci_tool": "Travis"},
|
||||||
{"ci_tool": "Gitlab"},
|
{"ci_tool": "Gitlab"},
|
||||||
{"ci_tool": "Github"},
|
{"ci_tool": "Github"},
|
||||||
|
{"ci_tool": "Drone"},
|
||||||
{"keep_local_envs_in_vcs": "y"},
|
{"keep_local_envs_in_vcs": "y"},
|
||||||
{"keep_local_envs_in_vcs": "n"},
|
{"keep_local_envs_in_vcs": "n"},
|
||||||
{"debug": "y"},
|
{"debug": "y"},
|
||||||
|
|
9
{{cookiecutter.project_slug}}/.drone.yml
Normal file
9
{{cookiecutter.project_slug}}/.drone.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: default
|
||||||
|
image: python
|
||||||
|
commands:
|
||||||
|
- pip install -r requirements.txt
|
||||||
|
- pytest
|
Loading…
Reference in New Issue
Block a user