<p>We are using kubernetes plugin for Jenkins to construct a special CI system. We want to achieve that:</p>

<ol>
<li><p>For a given build job(named <em>job_A</em>), it will be built more than one time;</p></li>
<li><p>We hope this job <em>job_A</em> to be bound to a specific jenkins-slave(named <em>pod_A</em>), and the <em>pod_A</em> should only provide service for <em>job_A</em>.</p></li>
<li><p>After the <em>job_A</em> finished the build, <em>pod_A</em> should keep alive for the period of time <em>time_T</em>;</p></li>
<li><p>During the <em>time_T</em>, the pod_A should not build other jobs even through it is idle.</p></li>
<li><p>After another time interval which is less than <em>time_T</em>(the <em>pod_A</em> is still alive), we want to re-build the <em>job_A</em>, it will be send to <em>pod_A</em> and be build there.</p></li>
</ol>

<p>Is there any way to achieve this?</p>

<p>In the PodTemplate definition there is an option idle time <em>Time in minutes to retain slave when idle</em> (<code>time_T</code>) that you can set to a large value.</p>

<p>Then set the label of the pod template to a unique value and same label in your job. That way that pod will only take builds of that job</p>
