{"id":684,"date":"2019-02-07T13:16:13","date_gmt":"2019-02-07T10:16:13","guid":{"rendered":"https:\/\/artem.services\/?p=595"},"modified":"2019-02-20T00:14:19","modified_gmt":"2019-02-19T21:14:19","slug":"git-diff-d1-84-d0-b0-d0-b9-d0-bb-d0-b0-d0-bc-d0-b5-d0-b6-d0-b4-d1-83-d0-bf-d0-be-d1-81-d0-bb-d0-b5-d0-b4-d0-bd-d0-b8-d0-bc-d0-b8-d0-bf-d0-80-b5-d0-b4-d0-bf-d0-be-d1-81-d0-bb-d0-b5-d0-b4","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=684&lang=en","title":{"rendered":"Git &#8212; Diff file between last and last commit"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"size-full wp-image-568 aligncenter\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/01\/BASH-Logo.png\" alt=\"\" width=\"376\" height=\"159\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/01\/BASH-Logo.png 376w, https:\/\/artem.services\/wp-content\/uploads\/2019\/01\/BASH-Logo-300x127.png 300w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/p>\n<p>This line checks the change of the &quot;<strong>configmap.yml<\/strong>&quot; file between the last and the last but one commit, if there was a change in it, then the <strong>configmap<\/strong> update in <strong>Kubernetes<\/strong> is performed.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nif git diff HEAD^ HEAD .jenkins\/configmap.yml | grep -q configmap; then ${KUBECTL} apply -f .jenkins\/configmap.yml; fi\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This line checks the change of the &quot;configmap.yml&quot; file between the last and the last but one commit, if there was a change in it, then the configmap update in Kubernetes is performed.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[415],"tags":[427,429,431,433,435],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/684"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=684"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/684\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/684\/revisions\/686"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}