{"id":279,"date":"2023-02-24T06:35:49","date_gmt":"2023-02-23T22:35:49","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=279"},"modified":"2023-02-24T06:36:18","modified_gmt":"2023-02-23T22:36:18","slug":"shell-use-jenkins-boolean-value","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/24\/shell-use-jenkins-boolean-value\/","title":{"rendered":"Shell\u4f7f\u7528Jenkins\u7684boolean\u503c"},"content":{"rendered":"<pre><code class=\"language-bash\">#!\/bin\/bash\nif ! [[ $SKIP_TESTS == true ]] ; then\n  #Do something if condition match\nfi<\/code><\/pre>\n<p><!-- more --><\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\nGRAY_MODE=false\navailabilityZone=ap-southeast-1c\nif [[ $GRAY_MODE = true &amp;&amp; &quot;$availabilityZone&quot; = &quot;ap-southeast-1c&quot; || $GRAY_MODE = false &amp;&amp; &quot;$availabilityZone&quot; = &quot;ap-southeast-1a&quot; ]] ; then\n  #Do something if condition match\nfi<\/code><\/pre>\n<blockquote>\n<p><code>=<\/code>\u4e0e<code>==<\/code>\u529f\u80fd\u4e00\u81f4\uff0c\u4f46\u662f\u5982\u679c\u4f7f\u7528<code>=<\/code>\u5224\u65ad\uff0c<code>=<\/code>\u53f7\u4e24\u8fb9\u5fc5\u987b\u52a0\u7a7a\u683c\uff0c\u5426\u5219\u8ba4\u4e3a\u662f\u8d4b\u503c\u8bed\u53e5<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/bash if ! [[ $SKIP_TESTS == true ]] ; then #Do s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[92],"class_list":["post-279","post","type-post","status-publish","format-standard","hentry","category-ci-cd","tag-jenkins"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=279"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/279\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}