<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Ok, this was a good learning.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">When running inside a shell that is
using 'set -e' to trap errors, and trying to handle an error from
a specific command without exiting the shell, don't do this ...</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"> ${cmd} "$@" | true</div>
<div class="moz-cite-prefix"> if [ ${PIPESTATUS[0]} -ne 0 ];
then<br>
/* handle error */<br>
fi</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">This sometimes yields to a
${PIPESTATUS[0]} of 141 if ${cmd} is still writing to stdout when
'true' exits.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Instead use 'tee' to consume (and
display) everything ${cmd} sends to stdout. As in ...<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"> ${cmd} "$@" | tee /dev/null<br>
if [ ${PIPESTATUS[0]} -ne 0 ]; then<br>
/* handle error */<br>
fi<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Triggering another build.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Scott<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 2020-10-23 4:23 a.m.,
<a class="moz-txt-link-abbreviated" href="mailto:build.starlingx@gmail.com">build.starlingx@gmail.com</a> wrote:<br>
</div>
<blockquote type="cite" cite="mid:1920507223.307.1603441415447.JavaMail.javamailuser@localhost">
<pre class="moz-quote-pre" wrap="">Project: STX_publish
Build #: 1777
Status: Still Failing
Timestamp: 20201023T080158Z
Check logs at:
<a class="moz-txt-link-freetext" href="http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/monolithic/20201023T043000Z/logs">http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/monolithic/20201023T043000Z/logs</a>
--------------------------------------------------------------------------------
Parameters
MY_WORKSPACE: /localdisk/loadbuild/jenkins/master/20201023T043000Z
OS: centos
PUBLISH_LOGS_URL: <a class="moz-txt-link-freetext" href="http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/monolithic/20201023T043000Z/logs">http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/monolithic/20201023T043000Z/logs</a>
RETRIES: 5
PUBLISH_LOGS_BASE: /export/mirror/starlingx/master/centos/monolithic/20201023T043000Z/logs
MASTER_JOB_NAME: STX_build_master_master
RETRY_INTERVAL_SEC: 300
MY_REPO_ROOT: /localdisk/designer/jenkins/master
PUBLISH_DISTRO_BASE: /export/mirror/starlingx/master/centos/monolithic
TIMESTAMP: 20201023T043000Z
PUBLISH_INPUTS_BASE: /export/mirror/starlingx/master/centos/monolithic/20201023T043000Z/inputs
LAYER:
PUBLISH_OUTPUTS_BASE: /export/mirror/starlingx/master/centos/monolithic/20201023T043000Z/outputs</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Starlingx-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Starlingx-discuss@lists.starlingx.io">Starlingx-discuss@lists.starlingx.io</a>
<a class="moz-txt-link-freetext" href="http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss">http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>