-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.py
50 lines (39 loc) · 1.54 KB
/
test.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
45
46
47
48
49
50
from jupextdemo.utils import *
from jupextdemo.azaks_deploy import *
from jupextdemo.gitHubManager import GithubManager
from jupextdemo.const import *
def _test_accounts():
pass
replyObject = {}
if __name__ == "__main__":
# STEP 1 : take the AKS and ACR details
# STEP 2 : Configure the Workflow files if they don't exist
# STEP 3: Check-In the Workflow files to Github Repo
# if aks_dep.IsUserLoggedIn():
# replyObject["DefaultSubscription"] = aks_dep.getDefaultSubscription()
# else:
# aks_dep.loginUserFlow()
# replyObject["DefaultSubscription"] = aks_dep.getDefaultSubscription()
# # get ACR details
# replyObject["ACRAccount"] = aks_dep.getACRDetails()
# # get AKS details
# replyObject["AKSCluster"] = aks_dep.getAKSDetails()
# now use this object and pass it to Github manager to implement
gm = GithubManager("e0322734b62f59cfb7e333995bcba9878696d000")
repo = gm.getRepo()
gm.pushFiles(repo)
# add Az credentials to github
# akscluster = replyObject["AKSCluster"][0] if len(
# replyObject["AKSCluster"]) > 0 else None
# acrAccount = replyObject["ACRAccount"][0] if len(
# replyObject["ACRAccount"]) > 0 else None
# gm.pushDeployFilestoRepo(akscluster, acrAccount)
# # print(files)
# newFile = "charts/Chart.yml"
# content = "Hello world".encode()
# repos.create_file(
# path=newFile,
# message="Create file for testCreateFile",
# content="this is the file content",
# branch="master",
# )