forked from cerc-io/stack-orchestrator
Beginnings of click support
This commit is contained in:
parent
8e75a1cedb
commit
fbf9d17a64
@ -25,6 +25,7 @@ import sys
|
||||
import argparse
|
||||
from decouple import config
|
||||
import subprocess
|
||||
import click
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="build the set of containers required for a complete stack",
|
||||
@ -37,6 +38,8 @@ parser.add_argument("--dry-run", action="store_true", help="don\'t do anything,
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@click.command()
|
||||
def command():
|
||||
verbose = args.verbose
|
||||
quiet = args.quiet
|
||||
|
||||
|
@ -19,6 +19,7 @@ import os
|
||||
import argparse
|
||||
from decouple import config
|
||||
from python_on_whales import DockerClient
|
||||
import click
|
||||
|
||||
def include_exclude_check(s, args):
|
||||
if args.include == None and args.exclude == None:
|
||||
@ -47,7 +48,8 @@ args = parser.parse_args()
|
||||
verbose = args.verbose
|
||||
quiet = args.quiet
|
||||
|
||||
print(args)
|
||||
@click.command()
|
||||
def command():
|
||||
|
||||
with open("cluster-list.txt") as cluster_list_file:
|
||||
clusters = cluster_list_file.read().splitlines()
|
||||
|
@ -22,6 +22,7 @@ import argparse
|
||||
from decouple import config
|
||||
import git
|
||||
from tqdm import tqdm
|
||||
import click
|
||||
|
||||
class GitProgress(git.RemoteProgress):
|
||||
def __init__(self):
|
||||
@ -52,6 +53,9 @@ parser.add_argument("--pull", action="store_true", help="pull from remote in alr
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@click.command()
|
||||
def command():
|
||||
|
||||
verbose = args.verbose
|
||||
quiet = args.quiet
|
||||
|
||||
|
@ -13,3 +13,16 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
||||
|
||||
import click
|
||||
|
||||
from .app import setup_repositories
|
||||
from .app import build_containers
|
||||
from .app import deploy_system
|
||||
|
||||
@click.group()
|
||||
def main_command_group():
|
||||
pass
|
||||
|
||||
main_command_group.add_command(setup_repositories.command)
|
||||
main_command_group.add_command(build_containers.command)
|
||||
main_command_group.add_command(deploy_system.command)
|
||||
|
Loading…
Reference in New Issue
Block a user