Barak Korren created OVIRT-1402:
-----------------------------------
Summary: Make pipeline lader more flexible
Key: OVIRT-1402
URL: https://ovirt-jira.atlassian.net/browse/OVIRT-1402
Project: oVirt - virtualization made easy
Issue Type: Improvement
Components: Jenkins
Reporter: Barak Korren
Assignee: infra
The pipeline loader, used to load pipeline scripts from the Jenkins repo is
missing a couple of useful features:
# It takes on a node and keeps it. If the pipelines are long, the node is kept
for the whole time even if its not used. It would be a useful optimization to
let pipeline scripts specify code that runs without the node.
# It is impossible to access functions that are defined in the loader from the
pipeline scripts.
The following solution is offered to provide both features:
We will change the loader to look for a "{{loader_main}}" function in the
pipeline script. If it exists it will call it passing itself as an argument.
This way that function will get access to function in the loader and can store
them for use by other functions.
If a "{{main}}" function exists in the pipeline script in addition to the
"{{loader_main}}" function, if will be called outside of the "{{node}}" block
in the loader. This way we can run code in "{{main}}" that does not need the
loader node.
If a "{{loader_main}}" function will not exist in a pipeline, the "{{main}}"
function will be called from inside the "{{node}}" block, like it is today.
This way we maintain compatibility with existing pipeline scripts.
--
This message was sent by Atlassian JIRA
(v1000.996.2#100044)
_______________________________________________
Infra mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/infra