report exactly which jobs will be deleted.
Using the glob parameters option to delete jobs, like so.. jenkins-jobs --conf jenkins_jobs.ini delete --path defs/cmd-002.yaml *bar* JJB would report the following: INFO:root:Deleting jobs in [*bar*] This change provides better info on exactly which jobs will get deleted. Now the log will report: INFO:jenkins_jobs.builder:Removing jenkins jobs: bar001, bar002 Change-Id: Iabac8104115860f2fb4f4cc0a4a10101559d470c
This commit is contained in:
parent
445c73a298
commit
316ba6c236
jenkins_jobs
@ -668,6 +668,9 @@ class Builder(object):
|
||||
if matches(j['name'], [glob_name])]
|
||||
else:
|
||||
jobs = [glob_name]
|
||||
|
||||
if jobs is not None:
|
||||
logger.info("Removing jenkins job(s): %s" % ", ".join(jobs))
|
||||
for job in jobs:
|
||||
self.jenkins.delete_job(job)
|
||||
if(self.cache.is_cached(job)):
|
||||
|
@ -218,7 +218,6 @@ def execute(options, config):
|
||||
|
||||
if options.command == 'delete':
|
||||
for job in options.name:
|
||||
logger.info("Deleting jobs in [{0}]".format(job))
|
||||
builder.delete_job(job, options.path)
|
||||
elif options.command == 'delete-all':
|
||||
confirm('Sure you want to delete *ALL* jobs from Jenkins server?\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user