I am relatively new to Jenkins, and want to pass some run information over to an agent. I’m currently creating a Channel from my controller that can call on the agent, but I don’t know how to read the info on that Channel from the agent’s side.
The getProperty and setProperty methods of Channel seem useful, but I am not sure how to use them if the agent cannot access the run information (which is used to instantiate the Channel).
Do you have an example of your code? I’ve never needed to use a channel before.
I’ve only ever used MasterToSlaveCallable (Jenkins core 2.364 API) with a launcher. This allows your controller to tell your agent to do stuff and return the results. Which is usually what is needed.
You can probably search the GitHub org for examples or I can find some when I’m not mobile.