Is it possible to launch a jenkins agent from within a script in another job? I'm open to either shell or pipeline options.
To be clear I don't mean the agent the job is running on itself. I'm talking about spinning up a completely separate agent.
Sometimes our master gets slammed with unit test requests and will make jobs wait in the queue for 15-20+ minutes instead of just spinning up more agents. I want to see if there's a way to spin an agent up intentionally so I can tie it into a job that polls the queue for wait times.