Skip to content

Commit

Permalink
[FIXED JENKINS-32515] allow specifying which variables may be blank.
Browse files Browse the repository at this point in the history
It is valid for some (and only some) variables to be blank - so allow
these variables to be set to the empty string.
  • Loading branch information
jtnord committed Jan 19, 2016
1 parent 260401a commit 362c47d
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

1 comment on commit 362c47d

@recena
Copy link
Contributor

@recena recena commented on 362c47d May 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtnord The ID in the commit is wrong.

Please sign in to comment.