-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtasks.py
More file actions
36 lines (27 loc) · 677 Bytes
/
tasks.py
File metadata and controls
36 lines (27 loc) · 677 Bytes
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
from contextlib import suppress
from invoke import task, run
@task
def test(context):
run("pytest -svv")
@task
def cookie(context):
run("cookiecutter --no-input --overwrite-if-exists . ")
print("Successfully Cut the Cookie")
@task
def build(context):
run("docker build --quiet --tag example example-app")
print("Successfully Built Container")
@task
def run_docker(context):
run("docker run -d -p 5000:5000 example")
@task
def stop(context):
with suppress(Exception):
run("docker stop example")
run("docker rm example")
@task
def e2e(context):
cookie(context)
stop(context)
build(context)
run_docker(context)