-
Notifications
You must be signed in to change notification settings - Fork 1
/
seed.py.aks.groovy
66 lines (50 loc) · 2.6 KB
/
seed.py.aks.groovy
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//github server setting
String github_token_credential = "git-token-credentials"
String github_host = "github.com"
//central pipeline repository
String pipeline_repository = "wuqunfei/jenkins_ai_pipelines"
String pipeline_jenkins_file = "Jenkinsfile.py.aks.groovy"
//application source code
String source_code_repository_url = "https://github.com/wuqunfei/ocr_service"
String source_code_branch = "main"
//deploy source code
String deploy_code_repository_url = "https://github.com/wuqunfei/jenkins_ai_deployment"
String deploy_code_branch = "main"
//Azure ACR and AKS
String acr_name = "proddstraining62so"
String acr_credential = "h10.training.acr"
String aks_kubeconfig_file_credential = "h10.training.aks"
String subscription_zone = "gdp-09.we1.azure.aztec.cloud.allianz"
//Application
String application_name = "pysimple"
String application_namespace = "customer-test"
pipelineJob("ocr-service-builder") {
parameters {
stringParam('github_token_credential', github_token_credential, 'Github token credential id')
stringParam("application_name", application_name, "application_name for docker image")
stringParam("application_namespace", application_namespace, "application namespace to deploy")
stringParam("source_code_repository_url", source_code_repository_url, "Application Source Code HTTP URL")
stringParam("source_code_branch", source_code_branch, "Application Source Code Branch, default main")
stringParam("deploy_code_repository_url", deploy_code_repository_url, "Helm/K8S deployment repository")
stringParam("deploy_code_branch", deploy_code_branch, "default branch of deployment repository")
stringParam("pipeline_repository", pipeline_repository, "pipeline github project name")
stringParam("pipeline_jenkins_file", pipeline_jenkins_file, 'pipeline file')
stringParam("acr_name", acr_name, "Azure Container Registry name for docker image")
stringParam("acr_credential", acr_credential, "Azure Container credential(user/pwd) id in jenkins ")
stringParam("aks_kubeconfig_file_credential",aks_kubeconfig_file_credential, "Azure AKS kubeconfig file credential id in Jenkins" )
stringParam("subscription_zone", subscription_zone, "Azure Subscription Zone for DNS")
}
definition {
cpsScm {
scm {
git {
remote {
github(pipeline_repository, "https", github_host)
credentials(github_token_credential)
}
}
}
scriptPath(pipeline_jenkins_file)
}
}
}