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

Key: QB-3379
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Robin Shen
Reporter: Paul Gross
Votes: 0
Watchers: 0

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

Some groovy expressions evaluate differently in trigger steps than they do in regular build steps.

Created: 24/Apr/19 12:17 AM   Updated: 11/Mar/20 08:55 AM
Component/s: None
Affects Version/s: 6.1.34
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Linux, CentOS6 & 7

 Description  « Hide
I'm having some mvel expressions that evaluate differently in different places; in once case I get different answers, in the other case, the expression works in one and fails in the other.

Background: I have a configuration A that triggers a build of configuration B and copies back files from B.

Problem 1)
I need to provide the full path to B's workspace. (Since the implied workspace for copying back seems to be A's.) When I use ${system.getConfiguration("/path/b").getWorkspaceDir()} in the trigger step, it does not yield B's workspace (it appears to yield A's workspace). However, it yields B's workspace when I use it in a plain build step (running a shell and printing the value).

Problem 2)
I was originally trying to get B to run on the same node as A. I passed A's name and port as a parameter: ${current.getNode().getHostName()}:${current.getNode().getPort()}
This failed, with a message about mvel not able to evaluate the expression. If I create a regular build step and use that exact same expression, it evaluates fine.

Am I doing something wrong? Is there something special about the environment in a trigger step when these are evaluated?

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