How to setup multiple Jenkins jobs to trigger after each other?
<p>I am working to setup CI for my NodeJS and Angular project. The manual process is to start the Node server first on cmd-A, and start the client (Angular) on different cmd-B. Then I launch the webdriver-manager to be able to test Angular Unit tests on cmd-C, and finally I execute the tests using <code>protractor</code>.</p>
<p>I am not sure how to implement this process in a Jenkins job. I am assuming I may have to define 4 different jobs.</p>
<ol>
<li>JobA - <code>npm start</code> (for Node server)</li>
<li>JobB - <code>npm start</code> (for Angular code)</li>
<li>JobC - <code>webdriver-manager start</code></li>
<li>JobD - <code>protractor tests.js</code></li>
</ol>
<p>I am not sure if the server is launched in JobA that means the build is still running, how can I send a trigger to JobB (once JobA has successfully started the server). How do I set up these 4 jobs?  What is the most optimized way in Jenkins for achieving this entire process?</p>
<h2>My folder structure is:</h2>
<pre><code>&gt;Project Root
    &gt;&gt;server
    &gt;&gt;&gt;tests
    &gt;&gt;&gt;package.json
    &gt;&gt;client
    &gt;&gt;&gt;comp1.ts
    &gt;&gt;&gt;comp1.spec.js
    &gt;&gt;package.json
</code></pre>
<p>Note: Server side tests are available in <code>server/tests</code> folder. Client side test are available in <code>client/*.spec.js</code> files. Right now the goal is to run client tests, which as pre-requisite to start server, start client, start webdriver-manager plugin, and then run the tests.</p>