{"id":2304,"date":"2026-07-20T12:41:36","date_gmt":"2026-07-20T10:41:36","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/how-to-setup-jenkins-step-by-step-tutorial\/"},"modified":"2026-08-27T17:48:02","modified_gmt":"2026-08-27T15:48:02","slug":"how-to-setup-jenkins-step-by-step-tutorial","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/how-to-setup-jenkins-step-by-step-tutorial\/","title":{"rendered":"How to Setup Jenkins \u2013 Step by Step Tutorial"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>Learn how to install Jenkins with Docker, create your first Pipeline, write a Jenkinsfile, and trigger automated builds from GitHub webhooks.<\/em><\/p>\n\n\n<p><!-- ktg-updated-banner --><\/p>\n<p><em>Updated August 2026 \u2014 full tutorial restored for this URL.<\/em><\/p>\n<h2>TL;DR<\/h2>\n<ul>\n<li>\n<p><strong>Jenkins<\/strong> automates software builds and CI\/CD workflows through configurable jobs and Pipelines.<\/p>\n<\/li>\n<li>\n<p>Install Jenkins quickly with <strong>Docker<\/strong>, then unlock it and install the recommended plugins.<\/p>\n<\/li>\n<li>\n<p>Create a <strong>Pipeline job<\/strong> and connect it to your Git repository using Pipeline script from SCM.<\/p>\n<\/li>\n<li>\n<p>A <strong>Jenkinsfile<\/strong> defines automated stages such as checkout, build, and testing as code.<\/p>\n<\/li>\n<li>\n<p><strong>GitHub webhooks<\/strong> can trigger Jenkins builds automatically whenever you push changes to your repository.<\/p>\n<\/li>\n<\/ul>\n<p>This tutorial walks through <strong>installing <a href=\"https:\/\/en.wikipedia.org\/wiki\/Jenkins_(software)\" target=\"_blank\" rel=\"noopener\">Jenkins<\/a><\/strong>, creating a first <strong>Pipeline<\/strong>, and triggering builds from <strong>GitHub<\/strong>.<\/p>\n<ol>\n<li><a href=\"#t1\">Install Jenkins (Docker quick start)<\/a><\/li>\n<li><a href=\"#t2\">Unlock and install plugins<\/a><\/li>\n<li><a href=\"#t3\">Create a Pipeline job<\/a><\/li>\n<li><a href=\"#t4\">Sample Jenkinsfile<\/a><\/li>\n<li><a href=\"#t5\">GitHub webhook<\/a><\/li>\n<\/ol>\n<p><strong id=\"t1\">1. Install Jenkins (Docker quick start)<\/strong><\/p>\n<pre><code>docker run -d --name jenkins -p 8080:8080 -p 50000:50000 \\\n  -v jenkins_home:\/var\/jenkins_home jenkins\/jenkins:lts\n<\/code><\/pre>\n<p>Open <code>http:\/\/localhost:8080<\/code>. Get the initial admin password:<\/p>\n<pre><code>docker exec jenkins cat \/var\/jenkins_home\/secrets\/initialAdminPassword\n<\/code><\/pre>\n<p><strong id=\"t2\">2. Unlock and install plugins<\/strong><\/p>\n<p>Paste the password \u2192 Install suggested plugins \u2192 create the first admin user.<\/p>\n<p><strong id=\"t3\">3. Create a Pipeline job<\/strong><\/p>\n<p>New Item \u2192 Pipeline \u2192 OK. Under Pipeline, choose \u201cPipeline script from SCM\u201d and point at your Git repo (or paste a script for a quick test).<\/p>\n<p><strong id=\"t4\">4. Sample Jenkinsfile<\/strong><\/p>\n<pre><code>pipeline {\n  agent any\n  stages {\n    stage('Checkout') {\n      steps { checkout scm }\n    }\n    stage('Build') {\n      steps { sh 'echo Building\u2026 &amp;&amp; .\/mvnw -DskipTests package || npm ci' }\n    }\n    stage('Test') {\n      steps { sh 'echo Tests\u2026' }\n    }\n  }\n}\n<\/code><\/pre>\n<p><strong id=\"t5\">5. GitHub webhook<\/strong><\/p>\n<p>In the GitHub repo: Settings \u2192 Webhooks \u2192 Add webhook. Payload URL: <code>http:\/\/YOUR_JENKINS\/github-webhook\/<\/code>. Content type JSON. Trigger on push. Install the GitHub plugin in Jenkins if prompted, then push a commit and watch the build.<\/p>\n<p>Related DevOps overview: <a href=\"https:\/\/kindsonthegenius.com\/blog\/introduction-devops-tools-and-techniques\/\">Introduction to DevOps Tools and Techniques<\/a> (Wave 3 rebuild).<\/p>\n<h2>Final Thought<\/h2>\n<p>Jenkins provides a flexible foundation for automating software builds and continuous integration. With Docker, you can get a Jenkins instance running quickly, while Pipeline-as-code makes your build process easier to version, review, and maintain alongside your application.<\/p>\n<p>The basic workflow is simple: <strong>Jenkins runs the Pipeline, the Jenkinsfile defines the stages, and GitHub webhooks trigger builds when code changes<\/strong>. Once this foundation is working, you can extend the Pipeline with real compilation, automated tests, deployments, notifications, and other CI\/CD steps.<\/p>\n<p>Starting with a small Pipeline is often the best approach. Get the build-and-trigger cycle working first, then gradually add the automation your project actually needs.<\/p>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to install Jenkins with Docker, create your first Pipeline, write a Jenkinsfile, and trigger automated builds from GitHub webhooks. Updated August 2026 \u2014 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[35],"tags":[],"class_list":["post-2304","post","type-post","status-publish","format-standard","hentry","category-algorithms"],"acf":[],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/2304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=2304"}],"version-history":[{"count":3,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/2304\/revisions"}],"predecessor-version":[{"id":2492,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/2304\/revisions\/2492"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=2304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=2304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=2304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}