-
Notifications
You must be signed in to change notification settings - Fork 2
/
tasks.py
40 lines (32 loc) · 893 Bytes
/
tasks.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
import invoke
from colorama import init
from kubesae import aws, deploy, image, info, pod
init(autoreset=True)
@invoke.task
def staging(c):
c.config.env = "staging"
c.config.namespace = "myproject-staging"
c.config.container_name = "myproject-web"
ns = invoke.Collection()
ns.add_collection(image)
ns.add_collection(aws)
ns.add_collection(deploy)
ns.add_collection(pod)
ns.add_collection(info)
ns.add_task(staging)
ns.configure(
{
"app": "myproject",
"aws": {
"region": "us-west-2",
"profile_name": "my-aws-profile", # a profile from .aws/credentials
},
"cluster": "Myproject-EKS-cluster",
"repository": "123456789012.dkr.ecr.us-east-1.amazonaws.com/myproject",
"hosting_services_backup_folder": "myproject",
"run": {
"echo": True,
"pty": True,
},
}
)