-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclickables.py
executable file
·44 lines (34 loc) · 1.24 KB
/
clickables.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/env python
# -*- encoding: utf-8 -*-
from __future__ import print_function
import logging
import os
import click
import clickable.utils
import clickable.coloredlogs
import clickable_ansible
import clickable_igloo
clickable.coloredlogs.bootstrap()
logger = logging.getLogger('stdout.clickable')
# name consistently with click-infra entry point
@click.group()
@click.pass_context
def main(ctx):
"""
Deployment or development tasks
"""
clickable.utils.load_config(ctx, __name__, __file__, 'clickables.yml')
igloo_ansible_playbooks = os.path.join(ctx.obj['project_root'], 'dependencies', 'igloo-ansible-playbooks')
clickable_igloo.symlink_folders(igloo_ansible_playbooks, ctx.obj['project_root'])
full = clickable_ansible.run_playbook_task(main, 'full',
'playbooks/igloo-playbooks/full.yml',
short_help="Igloo full deployment",
help="""Deploy a full Igloo stack.""",
# allow customization
common_hosts="all")
gitlabcd = clickable_ansible.run_playbook_task(main, 'gitlabcd',
'playbooks/igloo-playbooks/include/gitlab-cd.yml',
short_help="Igloo Gitlab deployment",
help="""Deploy a project on a machine.""",
# allow customization
common_hosts="all")