<div dir="ltr">Hi all,<div><br></div><div>I am very new to Jenkins, so please bear with me:)</div><div><br></div><div>We have this JJB config: <a href="https://github.com/almighty/almighty-jobs/blob/master/devtools-ci-index.yaml">https://github.com/almighty/almighty-jobs/blob/master/devtools-ci-index.yaml</a></div><div><br></div><div>Where there is this job-template: <a href="https://github.com/almighty/almighty-jobs/blob/master/devtools-ci-index.yaml#L195">https://github.com/almighty/almighty-jobs/blob/master/devtools-ci-index.yaml#L195</a></div><div><br></div><div>The script basically copies content of git cloned directory and runs build script. If that run is successful it deploys the resulting docker image to OpenShift.</div><div><br></div><div>We want to deploy images by tag - which corresponds to git commit hash, so it gets templated in by oc process. </div><div><br></div><div>The problem is that there are templates which have more parameters and we have taken care of this with a small script in this repostory: <a href="https://github.com/openshiftio/saas/">https://github.com/openshiftio/saas/</a></div><div><br></div><div>So my goal is to use that saas tool to do the deploy instead of plain oc process > oc apply.</div><div><br></div><div>As we have multiple templates which have different scripts, I'd like to avoid code duplication - I don't want to copy&paste the oc process/oc apply or the script calls around in the file.</div><div><br></div><div>So my thinking to solve this was to create some kind of hierarchy - I found something about dependencies and something called multijob where a job would trigger a build phase (build a docker image) and a deploy phase (oc apply). The key part is that if any of the phases fail, whole job fails. Also, deploy phase must not be triggered when build phase fails.</div><div><br></div><div>What would be the correct approach with JJB to solve this? Is this wrong thinking? Am I missing something from the Jenkins point of view?</div><div><br></div><div>I know this would be ideally solved by pipelines, but I don't think that is an option at the moment.</div><div><br></div><div>Looking forward to comments and suggestions,</div><div>Vašek<br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px"><div dir="ltr">Red Hat Developer Tools team<br>Brno, Czech Republic<br>Phone: +420 739 666 824<br></div></div><div style="font-size:12.8px"><br></div></div></div></div></div>
</div></div>