A system to validate plugin parameters in jenkins job builder
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Core Infrastructure |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
I noticed that parameters defined in yaml files are not validated before getting passed to jenkins job builder (builder.py). It would be nice to setup a system to validate that the parameters are somewhat correct before getting used by jenkins job builder.
For example if we look at this line in copyartifact in builder.py:
XML.
There might be 4 validations that can be done..
1. check that data["project"] is not null
2. check that data["project"] is not an empty string
3. check that data["project"] is a string type
4. check that jenkins actually has a project that matches data["project"]
The first 3 is pretty generic for every piece of data so maybe setup something that would let users specify that the data["project"] must be a string type, is required, and must not be an empty string when that data is defined.
So something like...
builders:
- copyartifact:
tags: | added: jjb |
Changed in openstack-ci: | |
assignee: | nobody → Khai Do (zaro0508) |
Changed in openstack-ci: | |
assignee: | Khai Do (zaro0508) → nobody |
This could use voluptuous as zuul does.