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

Key: QB-3350
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Don Ross
Votes: 0
Watchers: 0
Operations

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

would like to be able to use groovy scripting in Custom Header.

Created: 26/Feb/19 06:01 PM   Updated: 18/Mar/20 12:37 AM
Component/s: None
Affects Version/s: 8.0.38
Fix Version/s: 10.0.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: RHEL 7.


 Description  « Hide
We have a custom header to identify our development instance as such. However, when cloning a new development instance from our live server (by restoring on the new server from a recent backup), we have to remember to create the customer header from fresh.

The ability to embed scripts in the Custom Header field, would allow us to do something like this:

<h2 style="background-color:blue; padding:8px; color:white; margin-bottom:-8px;">
  QuickBuild ${groovy: node.getAttribute("QUICKBUILD_ISLIVE") == "true" ? "live server" : "development instance"}.
</h2>

A other use case for this is to alert people when they log in as the administrator:

${groovy:
  if (user.getName() == "admin")
    return '<h2 style="background-color:orange; padding:8px; margin-bottom:-8px;">Note: you are logged in as the QuickBuild admin.</h2>';
}


 All   Comments   Work Log   Change History      Sort Order:
No work has yet been logged on this issue.