FIPS restricts usage of md5 and requires the flag 'usedforsecurity' to be set False in order to avoid error:
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
Change-Id: I99a4ad0bf78bbeb898fb9dcfc79c03a14d596235
Resolves flake8 BLK related issues.
"BLK100 Black would make changes."
"BLK999 Unexpected exception: ..."
Change-Id: Ic6d4265e3d02b2f2a15ab851eaed98288c62730c
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Please review the following patch containing the code changes in
the repo. This patch is a transition patch and is the auto-generated
output of the python-black tool.
Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Non-view modules get called and add empty "actions", "builders" and
other XML elements to view XML tags where they are not supposed to be,
this causes Jenkins "Old data" warnings
Change-Id: Ie031192dca7ac0920e0953d533ed15c22db91022
Story: 2002159
Task: 20008
The view generation code was largely a copy/paste of the job generation
code. This refactors that shared code in to a super-class that both
code paths can share.
(This has the side effect of improving the error message when an
incorrect project-type is specified; that improvement was previously
only applied to views.)
Change-Id: I1316162b885267c5e21793e59c2c3f7b95d5ce3b
When specifying a view type that isn't supported by any modules (such as
"list-view" instead of "list"), this ensures that the user is guided
towards something correct.
This changes the error message in this case from:
AttributeError: 'NoneType' object has no attribute 'name'
to:
jenkins_jobs.errors.JenkinsJobsException: Unrecognized view type: list-view (supported types are: list, pipeline)
Change-Id: I0ee800db1c9c8aeecffcf11f1e86c03ba0590da8
Limit use of double underscore (or 'dunder') methods to python magic or
where it is an intention to avoid namespace collisions for classes
intended to be sub-classed.
An example were this would be applicable is a mixin class adding
memoisation to all methods would need to avoid namespace collisions
should it be added to a class intended to be sub-classed, and so for
any methods it uses to help manage the memoisation it should use
name-mangling to avoid them being accidentally overridden.
Change-Id: I0fe1e438687b23e2f0e1cef5229eef92e1a652ad
- Adds the ability for JJB to work with views
- Views can be created, updated, and deleted.
- New modules for List view and Build Pipeline view are added
- New tests for testing the deletion of views
Example View configuration:
- view:
name: MyView
view-type: list
Change-Id: Idb29a4407bcc14593e10a4d951036cb04e8e6c27
Co-Authored-By: Brandon Leonard <brandon.leonard@rackspace.com>
Co-Authored-By: Joao Vale <jpvale@gmail.com>
Co-Authored-By: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Separate XML generation from Yaml parsing/interpreting. The goal here
is to allow different sources to provide data for XML generation,
including external API users writing job definitions in pure Python or
JJB developers who would like to work on alternative Yaml parsing code
since the current YamlParser has very likely reached the limits of
what can be reasonably done with one giant expandYaml procedure.
Change-Id: I9da848acac7e944c0e07286b7399b2e1956a58a5
Remove the test options suppressing ignoring differences in whitespace
outputted in the XML to allow capturing of issues where the code
incorrectly adds or removes significant whitespace.
Add a helper function to deal with the edge case of parsing XML directly
that contains non significant whitespace to avoid accidentally adding
excess whitespace when minidom outputs the resulting document.
Change-Id: I9936042cd82c204ba2b3c19f575703e33564f7fd
With the reorganization of code to move the XmlJob class to a separate
file, the patch to modify the minidom method writexml for earlier
instances that incorrectly added whitespace should be relocated to be
alongside.
This ensures the patch exists along with the code that is using
minidom's functionality.
Change-Id: I6ed3267c3c076dc5f8d40f0c97706c33e4018261
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