Merge "Fail if specified set of defaults is not found."

changes/79/96279/1
Jenkins 9 years ago committed by Gerrit Code Review
commit 24ce90ea84
  1. 3
      jenkins_jobs/builder.py

@ -170,6 +170,9 @@ class YamlParser(object):
def applyDefaults(self, data):
whichdefaults = data.get('defaults', 'global')
defaults = self.data.get('defaults', {}).get(whichdefaults, {})
if defaults == {} and whichdefaults != 'global':
raise JenkinsJobsException("Unknown defaults set: '{0}'"
.format(whichdefaults))
newdata = {}
newdata.update(defaults)
newdata.update(data)

Loading…
Cancel
Save