<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kotapontan</author_name>
  <author_url>https://blog.hatena.ne.jp/kotapontan/</author_url>
  <blog_title>ヒトリ歩き</blog_title>
  <blog_url>https://kotapontan.hatenablog.com/</blog_url>
  <categories>
    <anon>Jenkins </anon>
  </categories>
  <description>仕事でJenkinsのpipelieでビルドをやってますが、シェルスクリプトの終了コードを取得したいケースが出てきたので、終了コードを取得するための方法を調べてみた。 色々と試行錯誤したり、Google先生に質問したりした結果・・・returnStatusオプションを使えば取得できるjenkins.io簡単な実装はこんな感じ。 node { stage(&quot;Test&quot;) { /* /tmp/hoge.shの終了コードをresult変数に格納する */ def result = sh ( script: &quot;/tmp/hoge.sh&quot;, returnStatus: true ) echo &quot;${re…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkotapontan.hatenablog.com%2Fentry%2F2018%2F02%2F09%2F225609&quot; title=&quot;pipelineでシェルスクリプトの終了コードを取得する方法を調べてみた - ヒトリ歩き&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-02-09 22:56:09</published>
  <title>pipelineでシェルスクリプトの終了コードを取得する方法を調べてみた</title>
  <type>rich</type>
  <url>https://kotapontan.hatenablog.com/entry/2018/02/09/225609</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
