{"id":1881,"date":"2018-12-19T12:44:18","date_gmt":"2018-12-19T03:44:18","guid":{"rendered":"https:\/\/hldc.co.jp\/blog\/?p=1881"},"modified":"2024-08-14T13:47:45","modified_gmt":"2024-08-14T04:47:45","slug":"%e5%8b%95%e7%9a%84%e3%83%86%e3%82%b9%e3%83%88%e3%81%ae%e8%87%aa%e5%8b%95%e5%8c%96%e3%82%92%e8%80%83%e3%81%88%e3%82%8b8","status":"publish","type":"post","link":"https:\/\/hldc.co.jp\/blog\/2018\/12\/19\/1881\/","title":{"rendered":"\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b#8"},"content":{"rendered":"<p>\u4eca\u56de\u306f\u3001\u300cPipeline as Code\u300d\u306b\u57fa\u3065\u3044\u305f\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u300d\u306e\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8003\u3048\u3066\u898b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<a href=\"https:\/\/hldc.co.jp\/blog\/2018\/07\/18\/1384\/\" target=\"_blank\" rel=\"noopener\">\u7b2c6\u56de<\/a>\u3067\u306f\u3001Jenkins\u3067\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u300d\u3059\u308b\u305f\u3081\u306eJob\u3092\u8a2d\u8a08\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u305d\u306e\u3068\u304d\u306b\u66f8\u3044\u305f\u5185\u5bb9\u306f\u3001\u8a00\u3063\u3066\u307f\u308c\u3070\u4e00\u9023\u306e\u4f5c\u696d\u3092\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u767b\u9332\u3057\u3066Jenkins\u4e0a\u3067\u5b9f\u884c\u3057\u305f\u3060\u3051\u306e\u3082\u306e\u3067\u3057\u305f\u3002\u305d\u3053\u3067\u3001\u4eca\u56de\u306f\u300cPipeline as Code\u300d\u3092\u610f\u8b58\u3057\u306a\u304c\u3089\u3001\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u300d\u306b\u5fc5\u8981\u306a\u51e6\u7406\u3092\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u3089\u3057\u3044\u8a18\u8ff0\u65b9\u6cd5\u306b\u7f6e\u304d\u63db\u3048\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<div class=\"box_border_gray\">\n<h5>CONTENTS<\/h5>\n<ol>\n<li><a href=\"#cont1\">\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u306e\u65b0\u898f\u4f5c\u6210<\/a><\/li>\n<li><a href=\"#cont2\">\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u306e\u8a2d\u5b9a<\/a><\/li>\n<li><a href=\"#cont3\">\u300cPipeline Script\u300d\u3067\u8a2d\u8a08<\/a><\/li>\n<li><a href=\"#cont4\">\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u8a18\u8ff0\u6642\u306e\u6ce8\u610f\u70b9<\/a><\/li>\n<li><a href=\"#cont5\">\u30b9\u30af\u30ea\u30d7\u30c8\u8a18\u8ff0\u4f8b<\/a><\/li>\n<li><a href=\"#cont6\">\u6700\u5f8c\u306b<\/a><\/li>\n<\/ol>\n<\/div>\n<div id=\"cont1\" class=\"anchor\">&nbsp;<\/div>\n<h2 class=\"title\">\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u306e\u65b0\u898f\u4f5c\u6210<\/h2>\n<p>\u6700\u521d\u306b\u3001Jenkins\u4e0a\u3067\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u65b0\u898f\u4f5c\u6210\u3057\u307e\u3059\u3002Jenkins\u306e\u30c8\u30c3\u30d7\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u65b0\u898f\u30b8\u30e7\u30d6\u4f5c\u6210\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\u30b8\u30e7\u30d6\u306e\u4f5c\u6210\u753b\u9762\u304c\u958b\u304f\u306e\u3067\u3001\u56f31\u306e\u3088\u3046\u306bJob\u306e\u540d\u524d\u3092\u5165\u529b\u3057\u3001\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u3092\u9078\u629e\u3057\u3001OK\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/df1d6353ab301852222318a767e03799.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2048\" src=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/df1d6353ab301852222318a767e03799.png\" alt=\"\" width=\"909\" height=\"1257\" srcset=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/df1d6353ab301852222318a767e03799.png 909w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/df1d6353ab301852222318a767e03799-217x300.png 217w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/df1d6353ab301852222318a767e03799-768x1062.png 768w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/df1d6353ab301852222318a767e03799-741x1024.png 741w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56f31: Job\u306e\u65b0\u898f\u4f5c\u6210<\/p>\n<div id=\"cont2\" class=\"anchor\">&nbsp;<\/div>\n<h2 class=\"title\">\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u306e\u8a2d\u5b9a<\/h2>\n<p>\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u65b0\u898f\u4f5c\u6210\u5f8c\u3001\u81ea\u52d5\u3067\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u306b\u5207\u308a\u66ff\u308f\u308a\u307e\u3059\u306e\u3067\u3001\u7d9a\u3051\u3066\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762(\u56f32)\u306f\u3001\u300c\u30d5\u30ea\u30fc\u30b9\u30bf\u30a4\u30eb\u30fb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d3\u30eb\u30c9\u300d\u3068\u6bd4\u3079\u308b\u3068\u3001\u8a2d\u5b9a\u5185\u5bb9\u304c\u5c11\u306a\u304f\u611f\u3058\u307e\u3059\u3002\u7d30\u304b\u306a\u8a2d\u5b9a\u5185\u5bb9\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u3057\u3066\u66f8\u304d\u306a\u3055\u3044\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/19807a60e8734ec59f000c84dca51fe7.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2050\" src=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/19807a60e8734ec59f000c84dca51fe7.png\" alt=\"\" width=\"909\" height=\"1464\" srcset=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/19807a60e8734ec59f000c84dca51fe7.png 909w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/19807a60e8734ec59f000c84dca51fe7-186x300.png 186w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/19807a60e8734ec59f000c84dca51fe7-768x1237.png 768w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/19807a60e8734ec59f000c84dca51fe7-636x1024.png 636w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56f32: \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u8a2d\u5b9a<\/p>\n<p>\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u8a2d\u5b9a\u306e\u300c\u5b9a\u7fa9\u300d\u306f\u300cPipeline script\u300d\u3068\u300cPipeline script from SCM\u300d\u306e2\u7a2e\u985e\u304b\u3089\u9078\u3079\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300cPipeline script\u300d\u306f\u3001Jenkins\u4e0a\u3067\u76f4\u63a5Groovy\u5f62\u5f0f\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304f\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u56f33\u306f\u3001Groovy\u3067\u66f8\u304b\u308c\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u8868\u793a\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScript.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2051\" src=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScript.png\" alt=\"\" width=\"909\" height=\"423\" srcset=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScript.png 909w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScript-300x140.png 300w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScript-768x357.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56f33: Pipeline Script<\/p>\n<p>\u4e00\u65b9\u306e\u300cPipeline script from SCM\u300d\u306f\u3001\u305d\u306e\u540d\u306e\u901a\u308aGit\u3084Subversion\u306a\u3069\u306eSCM\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8(Jenkinsfile)\u3092\u53d6\u5f97\u3057\u5b9f\u884c\u3059\u308b\u65b9\u5f0f\u3068\u306a\u308a\u307e\u3059(\u56f34)\u3002Jenkins\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3092\u8003\u3048\u308b\u3068\u3001\u5fc5\u7136\u7684\u306b\u300cPipeline script from SCM\u300d\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptScm.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2052\" src=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptScm.png\" alt=\"\" width=\"909\" height=\"273\" srcset=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptScm.png 909w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptScm-300x90.png 300w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptScm-768x231.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56f34: Pipeline Script from SCM<\/p>\n<div id=\"cont3\" class=\"anchor\">&nbsp;<\/div>\n<h2 class=\"title\">\u300cPipeline Script\u300d\u3067\u8a2d\u8a08<\/h2>\n<p>\u7d9a\u3044\u3066\u3001\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u4f7f\u7528\u3057\u305f\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u300d\u306eCI\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u8a2d\u8a08\u3092\u884c\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u524d\u8ff0\u306e\u901a\u308a\u3001\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u306f\u300cPipeline script\u300d\u3068\u300cPipeline script from SCM\u300d\u306e2\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u300cPipeline script\u300d\u306e\u65b9\u3067\u8a2d\u8a08\u3092\u884c\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/2018\/09\/26\/1509\/#cont2\" target=\"_blank\" rel=\"noopener\">\u7b2c7\u56de<\/a>\u3067\u89e6\u308c\u305f\u3088\u3046\u306b\u3001\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u300d\u3092CI\u5316\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u30d5\u30a7\u30fc\u30ba\u306f\u5927\u304d\u304f7\u3064\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"box_border_gray\">\u30fb\u30b3\u30fc\u30c9\u30a4\u30f3\u30b9\u30da\u30af\u30b7\u30e7\u30f3<br>\u30fb\u30c6\u30b9\u30c8\u30dd\u30a4\u30f3\u30c8\u306e\u633f\u5165<br>\u30fb\u30d3\u30eb\u30c9<br>\u30fb\u30c7\u30a3\u30d7\u30ed\u30a4<br>\u30fb\u30c6\u30b9\u30c8\u30fb\u30c6\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8\u53d6\u5f97<br>\u30fb\u30c6\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8\u89e3\u6790<br>\u30fb\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8<\/div>\n<p>\u3053\u308c\u3089\u306e\u30d5\u30a7\u30fc\u30ba\u3092\u300cPipiline Script\u300d\u3067\u8a00\u3046\u3068\u3053\u308d\u306e\u300cstage\u300d\u3068\u3057\u3066\u767b\u9332\u3057\u3066\u3042\u3052\u308b\u3068\u90fd\u5408\u304c\u3088\u3055\u305d\u3046\u3067\u3059\u3002\u307e\u305a\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u7684\u306a\u8a18\u8ff0\u3068\u3057\u3066\u56f35\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptSample.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2056\" src=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptSample.png\" alt=\"\" width=\"909\" height=\"517\" srcset=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptSample.png 909w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptSample-300x171.png 300w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineScriptSample-768x437.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56f35: \u30d5\u30a7\u30fc\u30ba\u3054\u3068\u306e\u8a18\u8ff0\u30b5\u30f3\u30d7\u30eb<\/p>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092Jenkins\u3067\u300c\u30d3\u30eb\u30c9\u5b9f\u884c\u300d\u3057\u3066\u307f\u308b\u3068\u3001\u56f36\u306e\u3088\u3046\u306aStage View\u304cJenkins\u4e0a\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2060\" src=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView1.png\" alt=\"\" width=\"909\" height=\"517\" srcset=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView1.png 909w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView1-300x171.png 300w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView1-768x437.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56f36: Stage View\u8868\u793a<\/p>\n<p>\u56f35\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u5404stage\u3054\u3068\u306b\u305d\u306e\u540d\u524d\u3092\u51fa\u529b\u3059\u308b\u3060\u3051\u306e\u5358\u7d14\u306a\u3082\u306e\u3067\u5fc5\u305a\u6b63\u5e38\u7d42\u4e86\u3057\u307e\u3059\u304c\u3001\u9014\u4e2d\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3068\u3001\u56f37\u306e\u3088\u3046\u306b\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305fstage\u306e\u8272\u304c\u5909\u308f\u308a\u305d\u3053\u3067\u51e6\u7406\u304c\u6b62\u307e\u308b\u305f\u3081\u3001\u3069\u306e\u30d5\u30a7\u30fc\u30ba\u3067\u3069\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u304b\u304c\u5206\u304b\u308a\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-2059\" src=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView2.png\" alt=\"\" width=\"909\" height=\"592\" srcset=\"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView2.png 909w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView2-300x195.png 300w, https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2018\/12\/PipelineStageView2-768x500.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56f37: Stage View\u30a8\u30e9\u30fc\u8868\u793a<\/p>\n<div id=\"cont4\" class=\"anchor\">&nbsp;<\/div>\n<h2 class=\"title\">\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u8a18\u8ff0\u6642\u306e\u6ce8\u610f\u70b9<\/h2>\n<p>\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3067\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306fGroovy\u3067\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3067\u5916\u90e8\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u304d\u306eGroovy\u306e\u8a18\u8ff0\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"groovy\" data-enlighter-theme=\"monokai\" data-enlighter-linenumbers=\"false\">node {\n    stage('\u30c6\u30b9\u30c8\u30dd\u30a4\u30f3\u30c8\u306e\u633f\u5165')\n        bat \"DTCmd -newins ${DtProj} ${DtFileList}\"\n}<\/pre>\n<p>\u57fa\u672c\u7684\u306b\u3001\u300cbat\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u308c\u306b\u7d9a\u304f\u6587\u5b57\u5217\u3092\u5916\u90e8\u30b3\u30de\u30f3\u30c9\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div id=\"cont5\" class=\"anchor\">&nbsp;<\/div>\n<h2 class=\"title\">\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3Script\u306e\u8a18\u8ff0\u4f8b<\/h2>\n<p>\u5f0a\u793e\u306e\u30c7\u30e2\u6a5f\u306e\u958b\u767a\u74b0\u5883\u3092\u5bfe\u8c61\u3068\u3057\u305f\u3068\u304d\u3001\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306eScript\u306f\u6b21\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"groovy\" data-enlighter-theme=\"monokai\" data-enlighter-linenumbers=\"false\">def ResultFolder=\"${env.JENKINS_HOME}\\\\jobs\\\\${env.JOB_NAME}\\\\Builds\\\\${env.BUILD_NUMBER}\\\\DT10\"\ndef DtRoot=\"${env.WORKSPACE}\\\\trunk\\\\AnalogBoxDemo1\"\ndef DtProj=\"${ResultFolder}\\\\AnalogBoxDemo.rprj\"\ndef DtTestTool=\"${env.WORKSPACE}\\\\trunk\\\\TestTool\"\ndef DtFileList=\"${DtTestTool}\\\\filelist.txt\"\ndef DtCsv=\"${DtTestTool}\\\\csv\"\ndef TiHome='C:\\\\Program Files(x86)\\\\Texas Instruments'\ndef TiCcs=\"${TiHome}\\\\ccsv4\"\ndef TiJava=\"${TiCcs}\\\\eclipse\\\\jre\\\\bin\\\\java\"\ndef TiJar=\"${TiCcs}\\\\eclipse\\\\startup.jar\"\ndef TiFlash=\"${TiHome}\\\\Stellaris\\\\LM Flash Programmer\\\\LMFlash\"\ndef TiWorkSpace=\"${env.WORKSPACE}\\\\trunk\"\ndef TiImage=\"${DtRoot}\\\\Debug\\\\AnalogBoxDemo.bin\"\ndef TiFlashOpt='--debug-port=JTAG --interface=ICDI --speed=300000 --frequency=6'\ndef TiFlashReset='--hreset'\ndef TestCommand=\"${DtTestTool}\\\\bin\\\\TestCommand.exe COM4\"\n\nnode {\n    stage('\u30b3\u30fc\u30c9\u30a4\u30f3\u30b9\u30da\u30af\u30b7\u30e7\u30f3'){\n        \/\/ \u4eca\u56de\u306f\u51e6\u7406\u3057\u306a\u3044\n    }\n    stage('\u30c6\u30b9\u30c8\u30dd\u30a4\u30f3\u30c8\u306e\u633f\u5165'){\n        echo '\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u65b0\u898f\u4f5c\u6210'\n        bat \"mkdir ${ResultFolder}\"\n        bat \"DTCmd -newproj ${DtProj} ${DtRoot} gpio4bit 0x00010\"\n        echo '\u30c6\u30b9\u30c8\u30dd\u30a4\u30f3\u30c8\u306e\u633f\u5165'\n        bat \"DTCmd -newins ${DtProj} ${DtFileList}\"\n    }\n    stage('\u30d3\u30eb\u30c9'){\n        bat \"${TiJava} -jar ${TiJar} -data ${TiWorkSpace} -application com.ti.ccstudio.apps.projectBuild -ccs.workspace\"\n    }\n    stage('\u30c7\u30a3\u30d7\u30ed\u30a4'){\n        bat \"${TiFlash} ${TiFlashOpt} ${TiImage}\"\n    }\n    stage('\u30c6\u30b9\u30c8\u30fb\u30c6\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8\u53d6\u5f97'){\n        bat 'DT10\u8d77\u52d5'\n        bat \"DTCmd -project ${DtProj}\"\n        echo '\u30c7\u30fc\u30bf\u53ce\u96c6\u958b\u59cb'\n        bat 'DTCmd -trace start'\n        echo '\u30ea\u30bb\u30c3\u30c8\u30b9\u30bf\u30fc\u30c8'\n        bat \"${TiFlash} ${TiFlashReset}\"\n        echo '\u30c6\u30b9\u30c8\u81ea\u52d5\u5b9f\u884c'\n        bat \"${TestCommand} \\\"test up\\\"\"\n        bat \"${TestCommand} \\\"test down\\\"\"\n        bat \"${TestCommand} \\\"test rand\\\"\"\n        bat \"${TestCommand} \\\"test screen\\\"\"\n        echo '\u30c7\u30fc\u30bf\u53ce\u96c6\u505c\u6b62'\n        bat 'DTCmd -trace stop'\n    }\n    stage('\u30c6\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8\u89e3\u6790'){\n        bat 'DTCmd -analyze all'\n    }\n    stage('\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8'){\n        bat \"mkdir ${DtCsv}\"\n        bat \"DTCmd -export coverage ${DtCsv}\\\\coverage.csv\"\n        bat \"DTCmd -export exectime ${DtCsv}\\\\exectime.csv\"\n        bat \"DTCmd -export period ${DtCsv}\\\\period.csv\"\n        echo 'DT10\u7d42\u4e86'\n        bat 'DTCmd -exit save'\n    }\n}<\/pre>\n<p><\/p>\n<h2 class=\"title\">\u6700\u5f8c\u306b<\/h2>\n<p>\u540c\u3058\u3088\u3046\u306a\u30d0\u30c3\u30c1\u51e6\u7406\u3067\u3082\u3001Jenkins\u306e\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u3088\u3063\u3066\u30d5\u30a7\u30fc\u30ba\u3054\u3068\u306b\u5206\u3051\u3066\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u53ef\u8aad\u6027\u3082\u30b0\u30c3\u3068\u3088\u304f\u306a\u3063\u305f\u3068\u601d\u3044\u307e\u3059\u3002<br>\u6b21\u56de\u306f\u3044\u3088\u3044\u3088\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b\u300d\u30b7\u30ea\u30fc\u30ba\u306e\u6700\u7d42\u56de\u3068\u306a\u308a\u307e\u3059\u3002\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b\u300d\u30b7\u30ea\u30fc\u30ba\u306e\u96c6\u5927\u6210\u3068\u3057\u3066\u3001\u3088\u308a\u5b9f\u8df5\u306b\u8fd1\u3044\u304b\u305f\u3061\u3067\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d44\u3093\u3067\u307f\u3066\u5b9f\u969b\u306b\u52d5\u304b\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u7279\u306b\u3001Git\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089Jenkinsfile\u3092\u53d6\u5f97\u3057\u3064\u3064\u3001\u4e00\u9023\u306e\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u300d\u306e\u305f\u3081\u306e\u51e6\u7406\u3092CI\u3067\u56de\u3059\u3068\u3053\u308d\u307e\u3067\u3092\u4e00\u6c17\u306b\u3084\u308a\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3054\u671f\u5f85\u304f\u3060\u3055\u3044\u3002<\/p>\n\n<div class=\"box_border_gray\">\n<h5>\u3010\u30db\u30ef\u30a4\u30c8\u30da\u30fc\u30d1\u30fc\u3011CI\u74b0\u5883\u306b\u304a\u3051\u308b\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u9069\u5fdc<\/h5>\n<p style=\"padding-bottom: 15px;\">\u3000\uff0d Jenkins\u3092\u4f7f\u3063\u305f\u52d5\u7684\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u306e\u65bd\u7b56\u4f8b \uff0d<\/p>\n<div><a class=\"button button-green\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/product_service\/development\/whitepaper\/wpaper-request\/?wpaper=7\" onclick=\"gtag('event', 'Click', {'event_category': 'WebLink','event_label': 'to\u30db\u30ef\u30a4\u30c8\u30da\u30fc\u30d1\u30fc\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9Jenkins\u3067\u81ea\u52d5\u5316_from1881'});\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306f\u3053\u3061\u3089\u304b\u3089<\/a><\/div>\n<\/div>\n\n\n<div class=\"box_border_gray\">\n<h5>\u30d0\u30c3\u30af\u30ca\u30f3\u30d0\u30fc<\/h5>\n<ul>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2017\/08\/31\/1\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to1_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #1\u300d- \u52d5\u7684\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u306e\u30e1\u30ea\u30c3\u30c8<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2017\/11\/13\/681\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to681_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #2\u300d- \u30c6\u30b9\u30c8\u30dd\u30a4\u30f3\u30c8\u633f\u5165\u306e\u305f\u3081\u306e4W2H<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2018\/01\/18\/894\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to894_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #3\u300d- CUI\u306b\u3088\u308b\u30c6\u30b9\u30c8\u30dd\u30a4\u30f3\u30c8\u633f\u5165<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2018\/03\/13\/1133\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to1133_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #4\u300d- DT\u30b7\u30ea\u30fc\u30ba\u88fd\u54c1\u3092Jenkins\u3067\u52d5\u304b\u3059\u305f\u3081\u306e\u6e96\u5099<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2018\/03\/28\/1189\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to1189_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #5\u300d- \u52d5\u7684\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u306e\u305f\u3081\u306e\u8a2d\u8a08<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2018\/05\/16\/1331\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to1331_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b \u756a\u5916\u7de8\u300d- ESEC2018\u306b\u51fa\u5c55\u3057\u305f\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u306e\u30c7\u30e2<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2018\/07\/18\/1384\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to1384_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #6\u300d- Job\u306e\u8a2d\u8a08<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2018\/09\/26\/1509\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to1509_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #7\u300d- Jenkins\u306e\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3067\u4f55\u304c\u3067\u304d\u308b\u304b<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2018\/11\/21\/1944\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to1944_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b \u756a\u5916\u7de82\u300d- ET2018\u306b\u51fa\u5c55\u3057\u305f\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u30c7\u30e2<\/a><\/li>\n<li>\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #8\u300d- Jenkins\u306e\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3067\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8a2d\u8a08<\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2019\/02\/20\/2077\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to2077_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #\u6700\u7d42\u56de\u300d- Jenkins\u306e\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3067\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u5b9f\u73fe<\/a><\/li>\n<li><a class=\"\" target=\"_blank\" href=\"https:\/\/hldc.co.jp\/blog\/2019\/03\/13\/2303\/\" onclick=\"gtag('event', 'Click', {'event_category': 'BlogLink','event_label': 'to2303_from1881'});\">\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u8003\u3048\u308b #\u6700\u7d42\u56de\u306e\u304a\u307e\u3051\u300d- Jenkins\u306b\u3088\u308b\u52d5\u7684\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u306e\u52d5\u753b<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c6\u56de\u3067\u3001Jenkins\u3067\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u300d\u3059\u308b\u305f\u3081\u306eJob\u3092\u8a2d\u8a08\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u305d\u306e\u3068\u304d\u306b\u66f8\u3044\u305f\u5185\u5bb9\u306f\u3001\u8a00\u3063\u3066\u307f\u308c\u3070\u4e00\u9023\u306e\u4f5c\u696d\u3092\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u767b\u9332\u3057\u3066Jenkins\u4e0a\u3067\u5b9f\u884c\u3057\u305f\u3060\u3051\u306e\u3082\u306e\u3067\u3057\u305f\u3002\u305d\u3053\u3067\u3001\u4eca\u56de\u306f\u300cPipeline as Code\u300d\u3092\u610f\u8b58\u3057\u306a\u304c\u3089\u3001\u300c\u52d5\u7684\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u300d\u306b\u5fc5\u8981\u306a\u51e6\u7406\u3092\u300c\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u300d\u3089\u3057\u3044\u8a18\u8ff0\u65b9\u6cd5\u306b\u7f6e\u304d\u63db\u3048\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":3,"featured_media":153,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_links_to":"","_links_to_target":""},"categories":[2,13],"tags":[],"featured_image_src":"https:\/\/hldc.co.jp\/blog\/wp-content\/uploads\/2017\/08\/img_auto_thinking-400x250.png","post_categories":[{"term_id":2,"name":"\u6280\u8853\u60c5\u5831","link":"https:\/\/hldc.co.jp\/blog\/category\/technical\/"},{"term_id":13,"name":"\u81ea\u52d5\u5316","link":"https:\/\/hldc.co.jp\/blog\/category\/%e8%87%aa%e5%8b%95%e5%8c%96\/"}],"_links":{"self":[{"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/posts\/1881"}],"collection":[{"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/comments?post=1881"}],"version-history":[{"count":11,"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/posts\/1881\/revisions"}],"predecessor-version":[{"id":14173,"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/posts\/1881\/revisions\/14173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/media\/153"}],"wp:attachment":[{"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/media?parent=1881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/categories?post=1881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hldc.co.jp\/blog\/wp-json\/wp\/v2\/tags?post=1881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}