{"id":2166,"date":"2026-07-22T18:23:20","date_gmt":"2026-07-22T11:23:20","guid":{"rendered":"https:\/\/sumberlaba.com\/index.php\/2026\/07\/22\/how-to-set-up-a-ci-cd-pipeline-with-jenkins-a-step-by-step-guide\/"},"modified":"2026-07-22T18:23:20","modified_gmt":"2026-07-22T11:23:20","slug":"how-to-set-up-a-ci-cd-pipeline-with-jenkins-a-step-by-step-guide","status":"publish","type":"post","link":"https:\/\/sumberlaba.com\/index.php\/2026\/07\/22\/how-to-set-up-a-ci-cd-pipeline-with-jenkins-a-step-by-step-guide\/","title":{"rendered":"How to Set Up a CI\/CD Pipeline with Jenkins: A Step-by-Step Guide"},"content":{"rendered":"<h1>How to Set Up a CI\/CD Pipeline with Jenkins: A Step-by-Step Guide<\/h1>\n<p>Jenkins is a powerful open-source automation server for building, testing, and deploying code. A robust CI\/CD pipeline ensures consistent, reliable software delivery. This guide walks you through setting up a basic pipeline in Jenkins.<\/p>\n<p>Before you begin, ensure you have Jenkins installed (via package manager or Docker), Java 8 or later, and a Git-based source control repository (e.g., GitHub, GitLab).<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/via.placeholder.com\/800x600\/4a90d9\/ffffff?text=how%20to%20set%20up%20a%20CI%2FCD%20pipeline%20with%20Jenkins\" alt=\"Article illustration\" style=\"display:block;margin:20px auto;max-width:100%;height:auto;border-radius:8px;\" \/><\/p>\n<h2>Step 1: Install Required Plugins<\/h2>\n<p>Plugins extend Jenkins functionality. For pipelines, install these essential plugins via <strong>Manage Jenkins &gt; Manage Plugins<\/strong>:<\/p>\n<ul>\n<li><strong>Git Plugin<\/strong> \u2013 to pull source code<\/li>\n<li><strong>Pipeline Plugin<\/strong> \u2013 to create pipeline jobs<\/li>\n<li><strong>Blue Ocean Plugin<\/strong> (optional) \u2013 for a modern UI<\/li>\n<\/ul>\n<h2>Step 2: Create a New Pipeline Job<\/h2>\n<p>From the Jenkins dashboard, click <strong>New Item<\/strong>, enter a name, and select <strong>Pipeline<\/strong>. Avoid Freestyle projects; Pipeline jobs give full flexibility with scripted or declarative syntax.<\/p>\n<h2>Step 3: Define Your Pipeline Script<\/h2>\n<p>In the job configuration, scroll to the <strong>Pipeline<\/strong> section. Choose <strong>Pipeline script<\/strong> and paste a declarative template:<\/p>\n<pre><code>pipeline {\n    agent any\n    stages {\n        stage('Checkout') {\n            steps {\n                git 'https:\/\/github.com\/your-repo.git'\n            }\n        }\n        stage('Build') {\n            steps {\n                sh 'mvn compile'\n            }\n        }\n        stage('Test') {\n            steps {\n                sh 'mvn test'\n            }\n        }\n        stage('Deploy') {\n            steps {\n                sh 'scp target\/*.war user@server:\/deploy'\n            }\n        }\n    }\n}\n<\/code><\/pre>\n<p>Replace commands and repository URL with your project details. Save the job.<\/p>\n<h2>Step 4: Trigger the Pipeline<\/h2>\n<p>Automate execution with one of these methods:<\/p>\n<ul>\n<li><strong>Webhooks<\/strong> \u2013 Add a webhook in your Git provider pointing to <code>http:\/\/your-jenkins:8080\/github-webhook\/<\/code> (or GitLab\/Bitbucket equivalents).<\/li>\n<li><strong>Poll SCM<\/strong> \u2013 In job config, under <strong>Build Triggers<\/strong>, check <strong>Poll SCM<\/strong> and set a cron schedule (e.g., <code>H\/5 * * * *<\/code> for every 5 minutes).<\/li>\n<li><strong>Manual Trigger<\/strong> \u2013 Click <strong>Build Now<\/strong> from the job page.<\/li>\n<\/ul>\n<p>With these steps, you now have a functional CI\/CD pipeline. Expand it later with parallel stages, approvals, or environment-specific deployments. Automation saves time and reduces errors\u2014start small and iterate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Set Up a CI\/CD Pipeline with Jenkins: A Step-by-Step Guide Jenkins is a powerful open-source automation server for building, testing, and deploying code. A robust CI\/CD pipeline ensures consistent, reliable software delivery. This guide walks you through setting up a basic pipeline in Jenkins. Before you begin, ensure you have Jenkins installed (via &hellip; <\/p>\n","protected":false},"author":2716,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-2166","post","type-post","status-publish","format-standard","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/posts\/2166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/users\/2716"}],"replies":[{"embeddable":true,"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/comments?post=2166"}],"version-history":[{"count":0,"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/posts\/2166\/revisions"}],"wp:attachment":[{"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/media?parent=2166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/categories?post=2166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sumberlaba.com\/index.php\/wp-json\/wp\/v2\/tags?post=2166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}