We are about to migrate the jenkins controller to a new system. (Jenkins 2.346.3)
There are no projects tied to the controller. All jobs run on the agent machines.
When i want to connect an agent to the new controller, all projects of this agent start to build. (They appear to kind of “have not run yet” to the new controller).
Is there a way to avoid running all projects if connecting the agents?
I use a small groovy script in my init.groovy.d directory to detect the existence of an environment variable and if that variable exists and is set to true, then the system is put into “Prepare for shutdown” state.
The script looks like this:
// Enter "Preparing to shutdown" state
if (System.getenv("START_QUIET")?.equalsIgnoreCase('true')) {
jenkins.model.Jenkins.instance.doQuietDown()
}