History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3568
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Robin Shen
Reporter: Jerry Lee
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Able to create user custom function in somewhere and share in everywhere.

Created: 07/May/20 09:56 AM   Updated: 07/May/20 10:28 AM
Component/s: None
Affects Version/s: 10.0.11
Fix Version/s: None

Original Estimate: 4 weeks Remaining Estimate: 4 weeks Time Spent: Unknown
Environment: N/A


 Description  « Hide
Hello, I have an query to improve QuickBuild's admin experience.

In my case, I've implemented various steps to make essential system.
Usually, I create the function(func_A) in steps to use.
Therefore, to change the function(func_A), I need to modify all the steps where that function(func_A) located.
Sometimes, it causes human error and hard to change it.

I'm not sure that this is an good idea but I would like to ask you.

If user could implement user defined function(func_A) in somewhere like Configuration, Plugin and QuickBuild could share, it would be very nice.
A function(func_A) need to be written at once and steps and variables do not need to re-write that whole function(func_A) all the time.

Of course I know that it could be done by adding function(func_A) in QuickBuild source code, but it requires restart to apply it when it modified.

So, if it is possoble, why don't you implment this kind of feature in QuickBuild?
Thanks.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [07/May/20 10:28 AM]
You may define a variable named "funcA" say in root configuration with value set to body of that function, and use groovy's Eval facility to evaluate value of variable "funcA" as code like below:

groovy:
Eval.me(vars.getValue("context", ["build":build, "configuration":configuration], "funcA"));

Inside body of funcA you may access context.build, context.configuration to currently running build/configuration. etc.