<< Back to previous view |
[QB-3350] would like to be able to use groovy scripting in Custom Header.
|
|
Status: | Resolved |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 8.0.38 |
Fix Version/s: | 10.0.0 |
Type: | Improvement | Priority: | Major |
Reporter: | Don Ross | Assigned To: | Robin Shen |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown | ||
Environment: | RHEL 7. |
Description |
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>'; } |