<p>osmith <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/12690">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved
  osmith: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">jenkins-common.sh: exit if image fails to build<br><br>docker_images_require() must fail when a new image can not be built,<br>even if an old image already exists.<br><br>We have this situation in a lot of the -latest tests right now, which<br>makes it harder to find the actual error.<br><br>Note that we can't simply use #!/bin/sh -e in all the jenkins.sh<br>scripts that source jenkins_common.sh, because they must be able to<br>clean up the docker containers on failure. So they can't abort<br>somewhere in the middle of the scripts. We could rewrite them to do the<br>clean up in a trap, but this should be done in a separate commit.<br><br>Related: OS#3767<br>Change-Id: I7039089457b62b8798a79c5efd62bd91622986d3<br>---<br>M jenkins-common.sh<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/jenkins-common.sh b/jenkins-common.sh</span><br><span>index f3d6c61..0dbe8b0 100644</span><br><span>--- a/jenkins-common.sh</span><br><span>+++ b/jenkins-common.sh</span><br><span>@@ -7,10 +7,10 @@</span><br><span>            # Trigger image build (cache will be used when up-to-date)</span><br><span>           if [ -z "$NO_DOCKER_IMAGE_BUILD" ]; then</span><br><span>                   echo "Building image: $i (export NO_DOCKER_IMAGE_BUILD=1 to prevent this)"</span><br><span style="color: hsl(0, 100%, 40%);">-                    make -C "../$i"</span><br><span style="color: hsl(120, 100%, 40%);">+                     make -C "../$i" || exit 1</span><br><span>          fi</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-          # Detect missing images (build skipped/failure)</span><br><span style="color: hsl(120, 100%, 40%);">+               # Detect missing images (build skipped)</span><br><span>              if ! docker_image_exists "$i"; then</span><br><span>                        echo "ERROR: missing image: $i"</span><br><span>                    exit 1</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12690">change 12690</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12690"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: docker-playground </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I7039089457b62b8798a79c5efd62bd91622986d3 </div>
<div style="display:none"> Gerrit-Change-Number: 12690 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>