{"id":1697,"date":"2023-03-25T22:53:40","date_gmt":"2023-03-25T14:53:40","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1697"},"modified":"2023-04-23T21:42:21","modified_gmt":"2023-04-23T13:42:21","slug":"spring-boot-publish-rollback","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/spring-boot-publish-rollback\/","title":{"rendered":"Spring Boot \u53d1\u5e03\u56de\u6eda"},"content":{"rendered":"<h2>\u624b\u5de5\u65b9\u6848<\/h2>\n<pre><code>aws s3 cp --region ap-east-1 s3:\/\/appblog-package\/bak\/pkgs\/2019\/12\/16\/05\/08\/appblog-test-1.0.0.jar \/home\/appblog\/pkgs\/\nnohup java -jar -Dspring.profiles.active=prod \/home\/appblog\/pkgs\/appblog-test-1.0.0.jar &gt; \/dev\/null 2&gt;&amp;1 &amp;<\/code><\/pre>\n<p><!-- more --><\/p>\n<h2>Jenkins\u53c2\u6570\u65b9\u6848<\/h2>\n<p>\u6839\u636e<code>git commit<\/code>\u7684\u7248\u672c\u56de\u6eda\u8bbe\u7f6e<\/p>\n<p>\u5728Jenkins\u914d\u7f6e\u4e2d\u627e\u5230<code>Pre Steps<\/code> -&gt; <code>Execute shell<\/code>\u4e2d\u6dfb\u52a0<code>git checkout ${commitid}<\/code>\u547d\u4ee4\uff0c\u5176\u4e2d<code>${commitid}<\/code>\u662fGit\u63d0\u4ea4\u7684\u7248\u672c\u53f7<\/p>\n<pre><code>pwd\nif [ -n &quot;${commitid}&quot; ]; then\n   git checkout ${commitid}\nfi<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u624b\u5de5\u65b9\u6848 aws s3 cp &#8211;region ap-east-1 s3:\/\/appblog-package\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-1697","post","type-post","status-publish","format-standard","hentry","category-spring-boot"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1697","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=1697"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1697\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}