{"id":24403,"date":"2023-09-15T04:34:51","date_gmt":"2023-09-14T19:34:51","guid":{"rendered":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/?page_id=24403"},"modified":"2025-10-24T19:51:56","modified_gmt":"2025-10-24T10:51:56","slug":"jenkins-pipeline","status":"publish","type":"page","link":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/test-automation\/ci-cd-tools-integration\/jenkins-pipeline\/","title":{"rendered":"Jenkins \u3068\u306e\u7d71\u5408 (\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3)"},"content":{"rendered":"<p>Jenkins \u306f\u4e3b\u8981\u306a\u30aa\u30fc\u30d7\u30f3 \u30bd\u30fc\u30b9\u306e\u81ea\u52d5\u5316\u30b5\u30fc\u30d0\u30fc\u3067\u3042\u308a\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d3\u30eb\u30c9\u3001\u30c7\u30d7\u30ed\u30a4\u3001\u81ea\u52d5\u5316\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u591a\u6570\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002Jenkins \u306f\u5358\u306b CI \u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3001\u7d99\u7d9a\u7684\u30c7\u30ea\u30d0\u30ea\u30fc\u306e\u30cf\u30d6\u3068\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u3001Web \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u7528\u3057\u305f\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3068\u8a2d\u5b9a\u304c\u5bb9\u6613\u3067\u3059\u3002<\/p>\n<p>Jenkins \u306e\u3088\u304f\u3042\u308b\u4f7f\u7528\u65b9\u6cd5\u306f\u3001\u30b3\u30fc\u30c9\u306e\u5909\u66f4\u304c\u30b5\u30d6\u30df\u30c3\u30c8\u3055\u308c\u308b\u305f\u3073\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d3\u30eb\u30c9\u3068\u30c6\u30b9\u30c8\u3092\u884c\u3046\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002TestRail \u306e\u5229\u70b9\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3057\u3001\u624b\u52d5\u306e\u3082\u306e\u3082\u81ea\u52d5\u5316\u3055\u308c\u305f\u3082\u306e\u3082\u542b\u3081\u3066\u3059\u3079\u3066\u306e\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u304a\u3088\u3073\u30c6\u30b9\u30c8\u7d50\u679c\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u3001Jenkins \u304b\u3089\u76f4\u63a5 TestRail \u306b\u81ea\u52d5\u30c6\u30b9\u30c8\u306e\u7d50\u679c\u3092\u9001\u4fe1\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001<strong>Jenkins \u306e\u30b9\u30af\u30ea\u30d7\u30c8 \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3 \u30b8\u30e7\u30d6<\/strong> \u3068 <strong><a href=\"\/test-automation\/testrail-cli\/overview-and-installation\/\" target=\"_blank\" rel=\"noopener\">TestRail CLI<\/a><\/strong> \u3092\u5229\u7528\u3057\u3066\u7c21\u5358\u306b\u3053\u306e\u30bf\u30b9\u30af\u3092\u9054\u6210\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"700\" height=\"394\" src=\"\/\/www.youtube-nocookie.com\/embed\/vKjXcBR-5Tw\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<div class=\"callout callout--info\">\n<p><span style=\"text-decoration: underline;\"><strong>\u203bTestRail CLI \u306f\u3001\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u3088\u3063\u3066\u3001\u4e92\u63db\u6027\u306e\u3042\u308b JUnit \u30ec\u30dd\u30fc\u30c8\u304c\u751f\u6210\u3055\u308c\u308b\u3053\u3068\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p id=\"01G959VQ4BTVBZYVBXTYPKVZGQ\" class=\"callout__title callout__icon\"><a href=\"https:\/\/support.gurock.com\/hc\/en-us\/articles\/7146548750868\"><\/a>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3001<strong><a href=\"https:\/\/www.jenkins.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Jenkins<\/a><\/strong> \u3068\u3068\u3082\u306b <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>GitHub<\/strong><\/a> \u304a\u3088\u3073 <strong><a href=\"https:\/\/docs.pytest.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pytest<\/a><\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n<h2 id=\"01G95CXQ21W0F4A5QSG4FT8G06\">\u524d\u63d0\u6761\u4ef6<\/h2>\n<div class=\"callout callout--info\">\n<p><span style=\"text-decoration: underline;\"><strong>\u203b\u3053\u306e\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u624b\u9806\u306f\u3001Python 3.10 \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f Jenkins \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3001<code class=\"inline-code\">python3.10<\/code> \u3068\u3044\u3046\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u4f7f\u7528\u3057\u3066 Python \u3092\u547c\u3073\u51fa\u305b\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u3059\u3067\u306b\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u305f Jenkins \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u9032\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/strong><\/span><\/p>\n<\/div>\n<p>\u624b\u9806\u306b\u5f93\u3063\u3066\u3059\u3070\u3084\u304f Jenkins \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6b21\u306e Dockerfile (<a href=\"https:\/\/hub.docker.com\/r\/jenkins\/jenkins\" target=\"_blank\" rel=\"noopener noreferrer\">\u516c\u5f0f\u306e Jenkins Docker \u30a4\u30e1\u30fc\u30b8<\/a>\u3092\u57fa\u306b\u3057\u3066\u3044\u307e\u3059) \u3092\u30d3\u30eb\u30c9\u3057\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u306b\u5f93\u3063\u3066\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol class=\"list-colored\">\n<li>\u6b21\u306e\u5185\u5bb9\u3092 Dockerfile \u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"dockerfile\">FROM jenkins\/jenkins:lts\n\nUSER root\nRUN apt-get update\nRUN apt-get install -y \\\n        build-essential \\\n        zlib1g-dev \\\n        libncurses5-dev \\\n        libgdbm-dev \\\n        libnss3-dev \\\n        libssl-dev \\\n        libreadline-dev \\\n        libffi-dev \\\n        libsqlite3-dev \\\n        wget \\\n        libbz2-dev\nRUN wget https:\/\/www.python.org\/ftp\/python\/3.10.0\/Python-3.10.0.tgz &amp;&amp; \\\n        tar -xvf Python-3.10.0.tgz &amp;&amp; \\\n        cd Python-3.10.0 &amp;&amp; \\\n        .\/configure --enable-optimizations &amp;&amp; \\\n        make -j 2 &amp;&amp; \\\n        make altinstall &amp;&amp; \\\n        python3.10 --version\nUSER jenkins<\/pre>\n<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u30b3\u30de\u30f3\u30c9 \u30e9\u30a4\u30f3\u3092\u958b\u304d\u307e\u3059\u3002<\/li>\n<li>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">docker build -t jenkins:local .\ndocker run -p 8080:8080 -p 50000:50000 jenkins:local<\/pre>\n<\/li>\n<li>\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u30ad\u30fc\u3092\u30b3\u30d4\u30fc\u3057\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u3067 <a href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a> \u3092\u958b\u304d\u307e\u3059\u3002<\/li>\n<li>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u30a6\u30a3\u30b6\u30fc\u30c9\u306b\u5f93\u3044\u307e\u3059\u3002<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2 id=\"01G8TJJS47CJF5RP2Z1ZZ8RSGA\">\u65b0\u898f Jenkins \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3 \u30b8\u30e7\u30d6\u306e\u4f5c\u6210<\/h2>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol class=\"list-colored\">\n<li>Jenkins \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067 [<strong>New Item<\/strong>] \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_01.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_01-1024x625.png\" alt=\"\" width=\"1024\" height=\"625\" class=\"aligncenter wp-image-24418 size-large\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_01-980x598.png 980w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_01-480x293.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/a><\/li>\n<li>[<strong>New Item name<\/strong>] \u306b\u5165\u529b\u3057\u3001[<strong>Pipeline<\/strong>] \u3092\u9078\u629e\u3057\u3066 [<strong>OK<\/strong>] \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_02.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_02.png\" alt=\"\" width=\"930\" height=\"623\" class=\"aligncenter size-full wp-image-24419\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_02.png 930w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_02-480x322.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 930px, 100vw\" \/><\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2 id=\"01G8TJJS473BRTR7N4A9TG4NNZ\">\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u8a2d\u5b9a<\/h2>\n<p>[<strong>Pipeline<\/strong>] \u30bb\u30af\u30b7\u30e7\u30f3\u306e\u30b9\u30af\u30ed\u30fc\u30eb \u30c0\u30a6\u30f3\u3057\u3001\u4e0b\u8a18\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_03.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_03.png\" alt=\"\" width=\"926\" height=\"559\" class=\"aligncenter wp-image-24420 size-full\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_03.png 926w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_03-480x290.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 926px, 100vw\" \/><\/a><\/p>\n<p>Jenkins \u30b9\u30af\u30ea\u30d7\u30c8 \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306f\u30b9\u30c6\u30fc\u30b8\u3067\u69cb\u6210\u3055\u308c\u3001\u30b9\u30c6\u30fc\u30b8\u5185\u306b\u306f\u5b9f\u884c\u5bfe\u8c61\u306e\u30b3\u30de\u30f3\u30c9\u3092\u542b\u3080\u30b9\u30c6\u30c3\u30d7\u304c\u3042\u308a\u307e\u3059\u3002\u6b21\u306b\u3001\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3 \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30b9\u30c6\u30fc\u30b8\u3054\u3068\u306b\u898b\u3066\u3044\u304d\u307e\u3059\u304c\u3001Jenkins \u30d1\u30a4\u30d7\u30e9\u30f3\u306e\u57fa\u672c\u306b\u306a\u3058\u307f\u304c\u306a\u3044\u5834\u5408\u3001<a href=\"https:\/\/www.jenkins.io\/doc\/book\/pipeline\/syntax\/\" target=\"_blank\" rel=\"noopener noreferrer\">Jenkins \u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u69cb\u6587\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3067\u8a73\u3057\u304f\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pipeline {\n    agent any\n\n    stages {\n\n        stage('Checkout') {\n            steps {\n                git url: 'https:\/\/github.com\/gurock\/automation-frameworks-integration.git', branch: 'main'\n            }\n        }\n\n        stage('Setup virtual environment') {\n            steps {\n                sh \"\"\"\n# Go to test project folder\ncd samples\/python\/pytest\n# Setup virtual environment\npython3.10 -m venv .\/venv\n\"\"\"\n            }\n        }\n\n        stage('Execute automated tests') {\n            steps {\n                sh \"\"\"\n# Go to test project folder and activate virtual environment\ncd samples\/python\/pytest\n. .\/venv\/bin\/activate\n\n# Install and run test project\npip install -r requirements.txt\npytest --junitxml \"reports\/junit-report.xml\" \".\/tests\"\n\"\"\"\n            }\n            post {\n                always {\n                    junit '**\/reports\/junit-report.xml'\n                    archiveArtifacts 'reports\/*'\n                    sh \"\"\"\n# Go to test project folder and activate virtual environment\ncd samples\/python\/pytest\n. .\/venv\/bin\/activate\n\n# Install TestRail CLI and upload test results\npip install trcli\ntrcli -y \\\n  -h \"https:\/\/YOUR_INSTANCE.testrail.io\/\" \\\n  -u \"USER_EMAIL\" \\\n  -p \"USER_PASSWORD\" \\\n  --project \"PROJECT\" \\\n  parse_junit \\\n  --title \"Automated Test Run\" \\\n  --run-description \"CI Build: ${BUILD_URL}\" \\\n  -f \"reports\/junit-report.xml\"\n\"\"\"\n                }\n            }\n        }\n\n    }\n}<\/pre>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>stage(&#8216;Checkout&#8217;)\n<ul>\n<li>\u30ea\u30dd\u30b8\u30c8\u30ea URL \u304a\u3088\u3073\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u5bfe\u8c61\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u6307\u5b9a\u3057\u305f <code class=\"inline-code\">git<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30b3\u30fc\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<li>stage(&#8216;Setup virtual environment&#8217;)\n<ul>\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5c02\u7528\u306e Python \u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b\u306e\u306f\u3001\u78ba\u5b9f\u306b\u4e00\u8cab\u6027\u306e\u3042\u308b\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u304b\u3089\u59cb\u3081\u308b\u306e\u306b\u826f\u3044\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3067\u3059\u3002\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u6b21\u306e\u30b9\u30c6\u30fc\u30b8\u3067\u306f\u3001\u4eee\u60f3\u74b0\u5883\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u3057\u3001\u30b7\u30a7\u30eb\u304c\u30b0\u30ed\u30fc\u30d0\u30eb\u306a Python \u3067\u306f\u306a\u304f\u4eee\u60f3\u74b0\u5883\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<li>stage(&#8216;Execute automated tests&#8217;)\n<ul>\n<li>\u3053\u306e\u30b9\u30c6\u30fc\u30b8\u306e\u6700\u521d\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u3001\u4eee\u60f3\u74b0\u5883\u306e\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u3067\u3042\u308a\u3001Pytest \u30c6\u30b9\u30c8 \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u76f4\u63a5\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002\u6b21\u306b\u3001pytest \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30c6\u30b9\u30c8 \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002&#8211;junitxml &#8220;reports\/junit-report.xml&#8221; \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001<a href=\"\/test-automation\/testrail-cli\/overview-and-installation\/\" target=\"_blank\" rel=\"noopener\">TestRail CLI<\/a> \u3067\u4f7f\u7528\u53ef\u80fd\u306a JUnit \u5f62\u5f0f\u306e\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210\u3059\u308b\u3088\u3046 Pytest \u306b\u6307\u793a\u3057\u307e\u3059\u3002\u8a73\u7d30\u306a\u8aac\u660e\u306f <a href=\"\/test-automation\/automation-frameworks\/pytest\/\" target=\"_blank\" rel=\"noopener\">Pytest \u3068\u306e\u7d71\u5408<\/a>\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b9\u30c6\u30fc\u30b8\u306b\u306f\u3001<code class=\"inline-code\">post { }<\/code> \u3068\u3044\u3046\u5185\u90e8\u30d6\u30ed\u30c3\u30af\u304c\u3042\u308a\u3001\u305d\u306e\u4e2d\u306b <code class=\"inline-code\">always { }<\/code> \u30d6\u30ed\u30c3\u30af\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30d6\u30ed\u30c3\u30af\u306b\u306f\u3001<code class=\"inline-code\">steps { }<\/code> \u7d50\u679c\u306b\u304b\u304b\u308f\u3089\u305a\u3001\u30d6\u30ed\u30c3\u30af\u304c\u5b8c\u4e86\u3057\u305f\u5f8c\u306b\u5e38\u306b\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30c6\u30b9\u30c8\u7d50\u679c\u3092 TestRail \u306b\u9001\u4fe1\u3059\u308b\u306e\u306b\u6700\u9069\u306a\u72b6\u6cc1\u3067\u3059\u3002\u7d50\u679c\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u306b\u306f\u3001\u3082\u3046\u4e00\u5ea6\u4eee\u60f3\u74b0\u5883\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u3057\u3001<code class=\"inline-code\">pip<\/code> \u3092\u4f7f\u7528\u3057\u3066 TestRail CLI \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001TestRail \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<code class=\"inline-code\">-h<\/code>\u3001<code class=\"inline-code\">-u<\/code>\u3001<code class=\"inline-code\">-p<\/code> \u304a\u3088\u3073 <code class=\"inline-code\">--project<\/code> \u306e\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u30fc\u3092\u7f6e\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3046 1 \u3064\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306e <code class=\"inline-code\">trcli<\/code> \u306e\u547c\u3073\u51fa\u3057\u3067\u3001\u3055\u3055\u3044\u3067\u3059\u304c\u5f79\u306b\u7acb\u3064\u60c5\u5831\u306f\u3001<code class=\"inline-code\">--run-description \"CI Build: ${BUILD_URL}\"<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u73fe\u5728\u306e Jenkins \u30d3\u30eb\u30c9 URL \u3092 TestRail \u306e\u30c6\u30b9\u30c8 \u30e9\u30f3\u306b\u8ffd\u52a0\u3057\u3001\u7c21\u5358\u306b\u30d3\u30eb\u30c9\u306b\u623b\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001\u63a8\u5968\u4e8b\u9805\u3068\u3057\u3066\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3084 API \u30c8\u30fc\u30af\u30f3\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u76f4\u63a5\u4f7f\u7528\u305b\u305a\u3001<a href=\"https:\/\/www.jenkins.io\/doc\/book\/using\/using-credentials\/\" target=\"_blank\" rel=\"noopener noreferrer\">Jenkins credentials manager<\/a> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"01GV19X2A6GQYYZA4RFJ40HC5N\"><span style=\"font-size: 1.5em;\">\u30b8\u30e7\u30d6\u306e\u5b9f\u884c<\/span><\/h2>\n<ol class=\"list-colored\">\n<li style=\"list-style-type: none;\">\n<ol class=\"list-colored\">\n<li>\u4e0a\u3067\u8a2d\u5b9a\u3057\u305f\u30b8\u30e7\u30d6\u3092\u4fdd\u5b58\u3057\u305f\u3089\u3001\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u305d\u308c\u306b\u306f\u3001\u5de6\u30d1\u30cd\u30eb\u306e [<strong>Build Now<\/strong>] \u30a2\u30af\u30b7\u30e7\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_04.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_04.png\" alt=\"\" width=\"939\" height=\"654\" class=\"aligncenter wp-image-24421 size-full\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_04.png 939w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_04-480x334.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 939px, 100vw\" \/><\/a><\/li>\n<li>\u30b8\u30e7\u30d6\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u30d3\u30eb\u30c9\u306e [<strong>Pipeline Steps<\/strong>] \u30da\u30fc\u30b8\u306e\u30ed\u30b0\u3092\u3056\u3063\u3068\u898b\u3066\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u671f\u5f85\u3069\u304a\u308a\u5b9f\u884c\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u30c6\u30b9\u30c8\u5b9f\u884c\u304c\u554f\u984c\u306a\u304f\u5b8c\u4e86\u3057\u3001TestRail CLI \u304c\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u6307\u5b9a\u3055\u308c\u305f\u5834\u6240\u3067\u30c6\u30b9\u30c8\u7d50\u679c\u306e JUnit \u30ec\u30dd\u30fc\u30c8\u3092\u767a\u898b\u3067\u304d\u305f\u5834\u5408\u3001TestRail CLI \u304c\u30c6\u30b9\u30c8\u7d50\u679c\u3092 TestRail \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u30b5\u30d6\u30df\u30c3\u30c8\u3057\u305f\u3053\u3068\u304c\u30ed\u30b0\u3067\u78ba\u8a8d\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_05-813x1024.png\" alt=\"\" width=\"813\" height=\"1024\" class=\"aligncenter wp-image-24422 size-large\" \/><\/a><\/li>\n<li>TestRail CLI \u3092\u5b9f\u884c\u3059\u308b\u30b9\u30c6\u30c3\u30d7\u306e [<strong>Console Output <\/strong>] \u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u5b9f\u884c\u306b\u95a2\u3059\u308b\u3088\u308a\u8a73\u3057\u3044\u60c5\u5831\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b\u306b\u306f\u3001TestRail CLI \u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u306f\u3001TestRail \u3067\u4f5c\u6210\u3055\u308c\u305f\u30c6\u30b9\u30c8 \u30e9\u30f3\u3078\u306e\u30ea\u30f3\u30af\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_06.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_06.png\" alt=\"\" width=\"767\" height=\"202\" class=\"aligncenter wp-image-24423 size-full\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_06.png 767w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_06-480x126.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 767px, 100vw\" \/><\/a><a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_07.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_07.png\" alt=\"\" width=\"875\" height=\"571\" class=\"aligncenter size-full wp-image-24424\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_07.png 875w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_07-480x313.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 875px, 100vw\" \/><\/a><\/li>\n<li>\u6700\u5f8c\u306b\u3001\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001TestRail \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u30c6\u30b9\u30c8 \u30e9\u30f3\u304c\u958b\u304d\u307e\u3059\u3002\u30c6\u30b9\u30c8 \u30e9\u30f3\u306f <strong>Automated Test Run<\/strong> \u3068\u3044\u3046\u540d\u524d\u3067\u3001\u30c6\u30b9\u30c8\u7d50\u679c\u3068\u3068\u3082\u306b\u3001\u30c6\u30b9\u30c8 \u30e9\u30f3\u3092\u751f\u6210\u3057\u305f Jenkins \u30b8\u30e7\u30d6 \u30d3\u30eb\u30c9\u3078\u306e\u30ea\u30f3\u30af\u304c\u542b\u307e\u308c\u307e\u3059\u3002<a href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_08.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_08-1024x707.png\" alt=\"\" width=\"1024\" height=\"707\" class=\"aligncenter wp-image-29588 size-large\" srcset=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_08-1024x707.png 1024w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_08-980x676.png 980w, https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-content\/uploads\/jenkins-pipeline_08-480x331.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2 id=\"01G74W5ZPGTYQ0PY1K37T54TF0\">\u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/h2>\n<p>\u30c6\u30b9\u30c8\u7d50\u679c\u304c TestRail \u306b\u96c6\u7d04\u3055\u308c\u305f\u306e\u3067\u3001\u5931\u6557\u3057\u305f\u30c6\u30b9\u30c8\u306e\u30a8\u30e9\u30fc \u30e1\u30c3\u30bb\u30fc\u30b8\u3082\u542b\u3081\u3066\u81ea\u52d5\u30c6\u30b9\u30c8\u5b9f\u884c\u306e\u7d50\u679c\u3092\u78ba\u8a8d\u3067\u304d\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u624b\u52d5\u30c6\u30b9\u30c8\u3068\u81ea\u52d5\u30c6\u30b9\u30c8\u3092\u30ec\u30dd\u30fc\u30c8\u4e0a\u3067\u96c6\u7d04\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u95a2\u3059\u308b\u5b8c\u5168\u306a\u30c6\u30b9\u30c8 \u30ab\u30d0\u30ec\u30c3\u30b8\u3092\u8868\u793a\u3057\u305f\u308a\u3001\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u30d7\u30ed\u30bb\u30b9\u3092\u8ffd\u8de1\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u307e\u305f\u3001\u624b\u52d5\u30c6\u30b9\u30c8\u306e\u7d50\u679c\u3060\u3051\u3067\u306a\u304f\u3001\u81ea\u52d5\u30c6\u30b9\u30c8\u306e\u7d50\u679c\u304b\u3089\u4efb\u610f\u306e\u8ab2\u984c\u30c8\u30e9\u30c3\u30ab\u30fc\u306b\u76f4\u63a5\u30d0\u30b0\u3092\u30ec\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>TestRail \u306e\u30ec\u30dd\u30fc\u30c8\u6a5f\u80fd\u3092\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/www.youtube.com\/watch?v=XXygDfOD2MY\" target=\"_blank\" rel=\"noopener\"><strong>TestRail \u306e\u30ec\u30dd\u30fc\u30c8\u304a\u3088\u3073\u30c6\u30b9\u30c8 \u30e1\u30c8\u30ea\u30af\u30b9\u306e\u52d5\u753b<\/strong><\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins \u306f\u4e3b\u8981\u306a\u30aa\u30fc\u30d7\u30f3 \u30bd\u30fc\u30b9\u306e\u81ea\u52d5\u5316\u30b5\u30fc\u30d0\u30fc\u3067\u3042\u308a\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d3\u30eb\u30c9\u3001\u30c7\u30d7\u30ed\u30a4\u3001\u81ea\u52d5\u5316\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u591a\u6570\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002Jenkins \u306f\u5358\u306b CI \u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3001\u7d99\u7d9a\u7684\u30c7\u30ea [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":24160,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-24403","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/24403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/comments?post=24403"}],"version-history":[{"count":21,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/24403\/revisions"}],"predecessor-version":[{"id":29589,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/24403\/revisions\/29589"}],"up":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/pages\/24160"}],"wp:attachment":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/9\/wp-json\/wp\/v2\/media?parent=24403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}