Skip to content

Commit

Permalink
Merge pull request #37 from jtnord/JENKINS-32516
Browse files Browse the repository at this point in the history
[FIXED JENKINS-32515] allow specifying which variables may be blank.
  • Loading branch information
jtnord committed Jan 19, 2016
2 parents 260401a + 362c47d commit a94c2d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/branding.py
Expand Up @@ -90,8 +90,11 @@ def apply_templating_to_folder(path, branding_map):
mypath = os.path.dirname(os.path.realpath(__file__))
branding_values = read_branding_variables(mypath, BRANDING_ENV_VARIABLE_LIST, BRANDING_ENV_PATH_LIST)

# List of branding values that are allowed to be blank
allowed_blank = ['RELEASELINE']
# Remove branding values with nothing set so we fail early if they are used in a template
branding_values = dict(filter (lambda x: x[1], branding_values.items()))
# except for values where blank is explicitly allows
branding_values = dict(filter (lambda x: x[0] in allowed_blank or x[1], branding_values.items()))

# Apply templating to files or content of folder
if os.path.isfile(path):
Expand Down

0 comments on commit a94c2d9

Please sign in to comment.