Jenkins trigger a job only after one has completed and avoid parallel execution of jobs
<p>I have two jobs in Jenkins: Job A that gets triggered on a commit and job B. Technically job B is triggered only after job A has been completed as job B is mentioned as a downstream of job A in the post build actions, but imagine this scenario:</p>

<p>Job A has been triggered by one commit and is running while the job B is still running from previous commit of job A, this is causing potential failures and complexity as both are running in parallel.</p>

<p>What is the best way to <em>prevent</em> both of them running in parallel?</p>

<p>These are the plugins I saw on jenkins wiki:</p>

<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/Build+Blocker+Plugin" rel="nofollow">Build Blocker Plugin</a><br>
<a href="https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin" rel="nofollow">Multijob Plugin</a></p>

<p>Still wanted to know the best course of action.</p>