Add overall config for drone.io support

This commit is contained in:
Shayan Karimi 2023-06-02 12:50:22 +04:30
parent ee31a1eb63
commit ebe3e0394c
4 changed files with 16 additions and 1 deletions

View File

@ -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"
} }

View File

@ -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()

View File

@ -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"},

View File

@ -0,0 +1,9 @@
kind: pipeline
name: default
steps:
- name: default
image: python
commands:
- pip install -r requirements.txt
- pytest