7 Commits

Author SHA1 Message Date
Jenkins
daf8be4480 Merge "Debug message leads to (n*m) log growth." 2015-12-03 04:59:49 +00:00
James E. Blair
7ef05f7373 Add template-name as a variable that can be used in a template
In complex configurations it may be useful to have a template
print out its name so that a given job can be easily traced to
its definition.

Change-Id: I1cfed9c27a58b45ba48aeed04839bfc8f54a831e
2015-11-24 07:47:26 -08:00
Wayne Warren
43cfc27360 Debug message leads to (n*m) log growth.
Where n = number of variables in scope for a particular job template instance.
and   m = number of job template instance.

Let's imagine for a large set of jobs with n = 100 and m = 50

This debug message makes it difficult to scan through JJB output looking for
signficant debug messages and does not provide a clear value.

It is trivially easy to know which variables are and which are not included in a
job-template's name by simply reading it.

Change-Id: I745e26ac6062277fc477cb1ca70cf2809f5806e3
2015-11-17 16:03:28 -08:00
Darragh Bailey
b023d7e23f Wrap file objects with codecs to handle unicode
Ensure file objects including stdin/stdout objects are wrapped using
codecs to handle unicode translation to the selected encoding for
input/output.

Add tests to simulate different encodings for input/output and
consequently fix the reading of input from stdin. Include test to
trigger failure to encode a unicode valid character using 'ascii'
encoding.

Change-Id: I9a5c4c96d131873db0000377729b8b0a45aa470d
2015-10-09 10:48:01 -07:00
Darragh Bailey
0e74bddb56 Replace open() with io.open() and force 'utf-8'
Use io.open() to allow reading and writing of files in 'utf-8' format
irrespective of the terminal encoding selected.

Change-Id: Ie952617a34c0719efc59a7729d698beafaa477b0
2015-07-25 14:16:12 -07:00
Richard Pijnenburg
b56e8812c7 Adding tests surrounding handling of defaults values
waynr fixed a bug but explained in concat_defaults002
This bug happens when some values are specified in an other defaults
namespace then global.
This causes JJB to fail that its unable to find the required keys
becasue these were not merged correctly

Change-Id: Id0df24ba7cf8281389c2ed7af7ee716047d0e4a5
2015-05-27 18:24:54 +02:00
Wayne
4a8b93b8c2 Remove YamlParser from jenkins_jobs.builder
The goal of this patch is simply to move some classes out of
jenkins_jobs.builder into more appropriately-named modules. This started with
simply moving YamlParser into jenkins_jobs.parser but led to other moves in
order to avoid cyclic imports since YamlParser uses other classes previously
defined in jenkins_jobs.builder.

That said, this patch doesn't intend to address all of the clutter in
jenkins_jobs.builder, mostly just what is necessary to get started working on
YamlParser independent of other classes in that module.

Change-Id: Ie88bf683e495033eb0b670fe29c256a70282735f
2015-04-22 11:59:07 -07:00