Update environment from agent within a job

16 views
Skip to first unread message

christop...@googlemail.com

unread,
Mar 10, 2023, 6:52:40 AM3/10/23
to Jenkins Users
Hi,

TLDR: while running a job on a (windows) agent, is there a way to refresh the environment from the agent to a shell- (actually bat-) step?

Whole story:
I want to test an application installer on a VM (I am resetting to a snapshot after the test).
After the installation I want to make sure installation worked well and all required components are available. Therfore I am starting parts of the application. Previously the installer required a reboot, that's why I set some environment variables (extension of PATH, etc...) manually.
Now we modified the installer to propagate the new enivronment using OS facilities. On a real PC with a human user this works well.
However it does not work within my jenkins job: environment is not available, even when I proceed the test in a new bat-step. Obviously that step is inheriting the environment from it's parent and that environment has not been updated.
FYI: for execution of the installer and test of the application I am using robotframework called from bat-steps.
Do you have any ideas for me how I can avoid my manual workaround and really test the installer environment?

Thanks in advance!
Christoph
Reply all
Reply to author
Forward
0 new messages