Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Skip Metadata Capture on unsupported Clouds
[releng/global-jjb.git]
/
jenkins-admin
/
create_jenkins_clouds_openstack_yaml.py
diff --git
a/jenkins-admin/create_jenkins_clouds_openstack_yaml.py
b/jenkins-admin/create_jenkins_clouds_openstack_yaml.py
index
ae51bd8
..
ea92aa7
100755
(executable)
--- a/
jenkins-admin/create_jenkins_clouds_openstack_yaml.py
+++ b/
jenkins-admin/create_jenkins_clouds_openstack_yaml.py
@@
-58,7
+58,7
@@
jenkins:
credentialsId: {{ cloud_credential_id }}
endPointUrl: {{ cloud_url }}
ignoreSsl: {{ cloud_ignore_ssl }}
credentialsId: {{ cloud_credential_id }}
endPointUrl: {{ cloud_url }}
ignoreSsl: {{ cloud_ignore_ssl }}
- name:
"cattle"
+ name:
{{ cloud_name }}
slaveOptions:
availabilityZone: {{ availability_zone }}
bootSource:
slaveOptions:
availabilityZone: {{ availability_zone }}
bootSource:
@@
-117,6
+117,8
@@
def parse_arguments():
parser.add_argument('--path', type=dir_path,
help="Path to jenkins-admin directory")
parser.add_argument('--path', type=dir_path,
help="Path to jenkins-admin directory")
+ parser.add_argument('--name', type=str,
+ help="cloud name IE: cattle")
parser.add_argument(
"-s", "--sandbox",
parser.add_argument(
"-s", "--sandbox",
@@
-178,7
+180,9
@@
for filename in glob.iglob(path, recursive=True):
# Global cloud config section
for section in config_parser_merged.sections():
if section == "cloud":
# Global cloud config section
for section in config_parser_merged.sections():
if section == "cloud":
- final = (config.items(section))
+ afinal = (config.items(section))
+ name = parsed_args.name
+ final = (*afinal, ("cloud_name", name))
for index, _ in enumerate(final):
for index, _ in enumerate(final):