File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,13 @@ def __init__(self, host=None):
4646 agent = os .path .join (
4747 os .path .abspath (os .path .dirname (__file__ )),
4848 'agent.py' )
49+ agent_prefix = os .environ .get ("LG_AGENT_PREFIX" , "" )
4950 if host :
5051 # copy agent.py and run via ssh
5152 with open (agent , 'rb' ) as agent_fd :
5253 agent_data = agent_fd .read ()
5354 agent_hash = hashlib .sha256 (agent_data ).hexdigest ()
54- agent_remote = f'.labgrid_agent_{ agent_hash } .py'
55+ agent_remote = os . path . join ( agent_prefix , f'.labgrid_agent_{ agent_hash } .py' )
5556 connect_timeout = get_ssh_connect_timeout ()
5657 ssh_opts = f'ssh -x -o ConnectTimeout={ connect_timeout } -o PasswordAuthentication=no' .split ()
5758 subprocess .check_call (
Original file line number Diff line number Diff line change @@ -124,6 +124,10 @@ CI pipelines where the username may not be consistent between pipeline stages.
124124.sp
125125Set the connection timeout when using SSH (The \fB ConnectTimeout \fP option). If
126126unspecified, defaults to 30 seconds.
127+ .SS LG_AGENT_PREFIX
128+ .sp
129+ Add a prefix to \fB \& .labgrid_agent_{agent_hash}.py \fP allowing specification for
130+ where on the exporter it should be uploaded to.
127131.SH MATCHES
128132.sp
129133Match patterns are used to assign a resource to a specific place. The format is:
Original file line number Diff line number Diff line change @@ -116,6 +116,11 @@ LG_SSH_CONNECT_TIMEOUT
116116Set the connection timeout when using SSH (The ``ConnectTimeout `` option). If
117117unspecified, defaults to 30 seconds.
118118
119+ LG_AGENT_PREFIX
120+ ~~~~~~~~~~~~~~~~~~~~~~
121+ Add a prefix to ``.labgrid_agent_{agent_hash}.py `` allowing specification for
122+ where on the exporter it should be uploaded to.
123+
119124MATCHES
120125-------
121126Match patterns are used to assign a resource to a specific place. The format is:
You can’t perform that action at this time.
0 commit comments