In our environment, we have configured our global storage directory to be a network location '/netstorage/${node.getHostName()}'. The embedded hostname is because we have both staging and production servers, and when we backup/restore the database from one environment to the other, we need it to automatically not step on the workspace of the other server.
We then have scripts that reference this path via 'system.getStorageDir().getPath()'. However, when executed on a build agent, the local storage directory on the agent is returned.
linux server: /netstorage/rh7x64adm2-2
linux agent: /opt/qbagent-8811/storage
windows agent: F:\qbagent-8811\storage
I think this is a bug, since 'global storage directory' implies the storage directory is, well, global. If the global storage directory were node-specific, I would use 'grid.getServerNode().getStorageDir().getPath()' but that method doesn't exist.
What is the correct solution in this case?