{"id":284991,"date":"2021-06-25T14:17:00","date_gmt":"2021-06-25T11:17:00","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/"},"modified":"2021-06-25T14:17:00","modified_gmt":"2021-06-25T11:17:00","slug":"how-to-build-a-jenkins-build-server-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/","title":{"rendered":"#How to Build a Jenkins Build Server \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b08ed5edbd\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b08ed5edbd\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Installing_Jenkins\" >Installing Jenkins<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Finding_the_Administrator_Password\" >Finding the Administrator Password<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Installing_Initial_Plugins\" >Installing Initial Plugins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Setting_Up_an_Admin_User\" >Setting Up an Admin User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Defining_the_Jenkins_URL\" >Defining the Jenkins URL<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Installing_Plug-Ins\" >Installing Plug-Ins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Setting_Up_a_Git_Repository\" >Setting Up a Git Repository<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Source_Code_Management\" >Source Code Management<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Build_Triggers\" >Build Triggers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Build\" >Build<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Optional_Post-Build_Actions\" >(Optional) Post-Build Actions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Running_the_Build\" >Running the Build<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-build-a-jenkins-build-server-cloudsavvy-it\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Build a Jenkins Build Server \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<figure style=\"width: 1400px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage wp-image-4356 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/8c35d4e1.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1400\" height=\"662\" data-credittext=\"Jenkins\" src=\"https:\/\/jenkins.io\/\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\"><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jenkins.io\/\">Jenkins<\/a><\/span><\/figcaption><\/figure>\n<p>Continuous integration and continuous deployment are two of the core principals of DevOps. Automating the build and deployment processes enables software development teams to make smaller changes more often.<\/p>\n<p>Automation limits bugs due to code other team members write, as the code was checked out. In order to achieve this benefit, a high degree of automation and orchestration is necessary. Enter <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jenkins.io\/\">Jenkins<\/a>.<\/p>\n<p>Jenkins is one of the most popular and flexible open-source orchestration tools out there. No matter if you working on a legacy monolith or micro-services, on-premise or in the cloud, Jenkins can help.<\/p>\n<p>In this article, to understand how Jenkins build servers work, we\u2019re going to walk through the basics of how to get a Jenkins server running. We\u2019re going to poll a local Git repository, and run some PowerShell code when a change is made to that repository to get a sense of the workflow.<\/p>\n<h2 id=\"prerequisites\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We get hands-on in this article. If you\u2019d like to follow along, be sure you have a few prerequisites in place:<\/p>\n<ul>\n<li>A Mac, Linux, or Windows device with:\n<ul>\n<li>Java 1.7 or higher (Jenkins runs on Java)<\/li>\n<li>A package manager (<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/chocolatey.org\/\">Chocolatey<\/a>, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/brew.sh\/\">Homebrew<\/a>, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/en.wikipedia.org\/wiki\/APT_(software)\">apt<\/a>, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/en.wikipedia.org\/wiki\/Yum_(software)\">yum<\/a>, etc)<\/li>\n<li>A web browser (Chrome, Firefox, or any Chromium-based browser work best)<\/li>\n<li>Git (Can install this with the package manager)<\/li>\n<\/ul>\n<\/li>\n<li>A Git repository<\/li>\n<\/ul>\n<h2 id=\"installing-jenkins\"><span class=\"ez-toc-section\" id=\"Installing_Jenkins\"><\/span>Installing Jenkins<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can\u00a0<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jenkins.io\/doc\/book\/installing\/\">install Jenkins<\/a>\u00a0in numerous ways, each of them fitting a different platform and use case. If you are building a production server, you may want to consider using a different method from the one shown, but the easiest way to install Jenkins is with a package manager.<\/p>\n<p>On Windows, you likely use <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/chocolatey.org\/packages\/jenkins\">Chocolatey<\/a>, on MacOS\u00a0\u00a0<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/formulae.brew.sh\/formula\/jenkins\">Homebrew<\/a>, and on Linux it depends on <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jenkins.io\/doc\/book\/installing\/#linux\">which distribution of Linux<\/a> you are using.<\/p>\n<p>Once you have installed Jenkins, you can access it right from your web browser. Open your browser and navigate to <code>[localhost:8080](http:\/\/localhost:8080)<\/code>\u00a0, and you see Jenkins starting or waiting for an initial password.<\/p>\n<p><code>localhost<\/code> is referring to the Jenkins service that is now running on your device while port <code>8080<\/code> is the default Jenkins UI port.<\/p>\n<h3 id=\"finding-the-administrator-password\"><span class=\"ez-toc-section\" id=\"Finding_the_Administrator_Password\"><\/span>Finding the Administrator Password<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>On the first page, Jenkins writes a one-time password to a file, then gives you the location of the file. This process makes sure you have access to the file system of the system you installed it on.<\/p>\n<p>Get the password from this file, the enter it in the <em>Administrator password<\/em> box shown in the screenshot below to continue.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2916 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/083aa9cd.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Get the password and enter it in the Administrator password box to continue.\" width=\"1324\" height=\"951\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h3 id=\"installing-initial-plugins\"><span class=\"ez-toc-section\" id=\"Installing_Initial_Plugins\"><\/span>Installing Initial Plugins<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, Jenkins is going to ask you if you want to pick and choose the plugins to install, or use the recommended defaults. Plugins are how Jenkins interacts with other components and services. You install more plugins later, but for now, select the defaults.<\/p>\n<h3 id=\"setting-up-an-admin-user\"><span class=\"ez-toc-section\" id=\"Setting_Up_an_Admin_User\"><\/span>Setting Up an Admin User<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>After a few minutes, you need to setup your first Jenkins admin user. This can be changed later, but it\u2019s important to pick one that you will remember at least during the setup process, like the one below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2917 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/01618c46.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Set up your first Jenkins admin user.\" width=\"1215\" height=\"880\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h3 id=\"defining-the-jenkins-url\"><span class=\"ez-toc-section\" id=\"Defining_the_Jenkins_URL\"><\/span>Defining the Jenkins URL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, you\u2019re asked to set up the Jenkins URL. This process is <em>not<\/em> going to do any DNS or domain registration and has no effect on how you access Jenkins. There\u2019s no need to worry about the URL for this walkthrough. But the URL will be used in any webhooks and environment variables that Jenkins creates.<\/p>\n<blockquote><p><em>If this is for a production system, you may want to consider buying a domain and giving Jenkins a subdomain to use. (For example: jenkins.mydomain.com)<\/em><\/p>\n<\/blockquote>\n<p>Once you click on <em>Save<\/em> and <em>Finish<\/em>, you\u2019re taken to an empty Jenkins page like this one below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2918 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/70c7c44e.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"An empty Jenkins page.\" width=\"1512\" height=\"922\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"installing-plug-ins\"><span class=\"ez-toc-section\" id=\"Installing_Plug-Ins\"><\/span>Installing Plug-Ins<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now that Jenkins is up and running, you should know something about it: out of the box, Jenkins doesn\u2019t do very much. To get the most out of Jenkins, you must install plug-ins.<\/p>\n<p>Plugins are open-source packages that interact with other programs and services within Jenkins.<\/p>\n<p>You can find plugins for anything from additional version control systems, to cloud providers, to <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/plugins.jenkins.io\/chucknorris\">Chuck Norris<\/a>.<\/p>\n<p>PowerShell is a part of the requirements of this article. As such, you need to install the PowerShell plugin and maybe the Chuck Norris one, too.<\/p>\n<blockquote><p><em>Chuck Norris doesn\u2019t break builds, unworthy builds stop in their tracks in his presence.<\/em><\/p>\n<\/blockquote>\n<p>Click on <em>Manage Jenkins<\/em> in the menu on the left, then find the puzzle piece icon that reads <em>Manage Plugins<\/em>. Then, under the <em>Available<\/em> tab, you can browse around and see what\u2019s available.<\/p>\n<p>Click on the checkbox next to the PowerShell plugin and click <em>Install without restart<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2919 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/5b6fed88.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Under the Available tab, you can see what\u2019s available.\" width=\"1036\" height=\"390\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"setting-up-a-git-repository\"><span class=\"ez-toc-section\" id=\"Setting_Up_a_Git_Repository\"><\/span>Setting Up a Git Repository<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The next thing we need to do is set up our git repository. Jenkins polls this repository for changes to run our build. <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/help.github.com\/en\/github\/creating-cloning-and-archiving-repositories\/cloning-a-repository\">Get the repository URL and clone it<\/a>, but save the URL because you need it in the next step.<\/p>\n<p>Back in Jenkins, select <em>New Item<\/em> from the top left corner, then click on <em>Freestyle Project<\/em> and give it a name. A good name has to be unique to Jenkins, but also describes quickly what task it is doing on which project.<\/p>\n<p>The next page you\u2019re taken to is the <em>Configure Project<\/em> page. This may look overwhelming, but don\u2019t worry about it right now. Even in production, you won\u2019t use most of these because while every one of these options has a use case for someone, not all of them will fit your use case.<\/p>\n<p>As you scroll down the configuration page, notice the many available options. Below, you\u2019ll find each option and the value that should be provided for this demonstration.<\/p>\n<h2 id=\"source-code-management\"><span class=\"ez-toc-section\" id=\"Source_Code_Management\"><\/span>Source Code Management<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Click on <em>Git<\/em>, then enter your repository URL in the <em>Repository URL<\/em> field. Leave the rest of the settings as default. This is going to tell Jenkins to poll that repository for any changes on the master branch as that\u2019s the default setting.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2920 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/fb5a9748.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Click on Git, then enter your repository URL in the Repository URL field.\" width=\"1420\" height=\"758\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"build-triggers\"><span class=\"ez-toc-section\" id=\"Build_Triggers\"><\/span>Build Triggers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Select <em>Poll SCM<\/em>, then enter <code>* * * * *<\/code> in the <em>Schedule<\/em> field. This is a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/support.acquia.com\/hc\/en-us\/articles\/360004224494-Cron-time-string-format\">cron timer<\/a> that polls for changes to that repository every minute.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2921 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/87de807d.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Select Poll SCM, then enter * * * * * in the Schedule field. \" width=\"1413\" height=\"612\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"build\"><span class=\"ez-toc-section\" id=\"Build\"><\/span>Build<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Under the <em>Add Build Step<\/em> dropdown, select <em>Windows PowerShell<\/em> and enter <code>Get-ChildItem $ENV:WORKSPACE<\/code> in the <em>Command<\/em> field. This command uses a built-in Jenkins variable (which is covered more in-depth shortly) to print out a list of files from the repository you are looking at.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2922 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/901c04c4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Under the Add Build Step dropdown, select Windows PowerShell and enter Get-ChildItem $ENV:WORKSPACE in the Command field. \" width=\"1410\" height=\"448\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"optional-post-build-actions\"><span class=\"ez-toc-section\" id=\"Optional_Post-Build_Actions\"><\/span>(Optional) Post-Build Actions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you installed the Chuck Norris plugin earlier, select <em>Activate Chuck Norris<\/em> from the <em>Add Post-build step<\/em> dropdown to add the Chuck Norris plugin\u2019s visual effect to the job. Jenkins does not actually activate Chuck Norris, Jenkins just looks for his <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>roval.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2923 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/02010440.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"select Activate Chuck Norris from the Add Post-build step dropdown to add the Chuck Norris plugin\u2019s visual effect to the job.\" width=\"1398\" height=\"243\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"running-the-build\"><span class=\"ez-toc-section\" id=\"Running_the_Build\"><\/span>Running the Build<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>All Jenkins builds take place in a workspace, which is a directory on the Jenkins server. The test project that you defined above clones the repository from the git URL into that workspace, then runs the build steps as a .ps1 script.<\/p>\n<p>Earlier when you entered <code>$ENV:WORKSPACE<\/code> in the build step, you may have wondered where that variable is coming from. Jenkins provides some environment variable at the runtime of each job, including <code>$ENV:WORKSPACE<\/code>, which points to the path of the cloned repository.<\/p>\n<p>Now that your job is configured, it\u2019s time to test it. You can run it one of two ways: Either push a new commit to the repository and wait for Jenkins to poll the change, or press the <em>Build Now<\/em> button on the left side of the page. Whatever method you choose, it triggers a new run of this Jenkins job, which means your home page should now look like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2924 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/9c18b4e0.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Your home page after testing a new run of your Jenkins job.\" width=\"1894\" height=\"1013\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>For one final sanity check to make sure our job ran successfully, click on the build number under the <em>Build History<\/em>. This page shows you some details like the changes that triggered the build, what the git commit ID is, and which user pushed those commits.<\/p>\n<p>For even more details, click on <em>Console Output<\/em> on the left side of the screen and you\u2019ll see each command line step Jenkins took while running the build.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2925 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/203c075c.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Console Output shows each command line step Jenkins took running the build.\" width=\"1253\" height=\"727\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Because this build also included a <code>Get-ChildItem<\/code> on the Jenkins workspace, the output from that cmdlet at the bottom of the console output similar to the one below is shown.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-2926 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/88b2d196.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A similiar output from cmdlet. \" width=\"1485\" height=\"739\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"summary\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now that you know how to setup a Jenkins server, install plugins, and run a job, you should take a look at the available Jenkins plugins from the <em>Manage Plug-Ins<\/em> page mentioned earlier. Not all of them will fit your needs, but they all fit some need and might be worth knowing about.<\/p>\n<p>If you have <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/github.com\/enterprise\">GitHub enterprise<\/a>, you can connect your GitHub account to Jenkins to do things like require status checks before merging to master, automate deployments from source, and run a CI pipeline against any new changes to code. Have fun!\n<\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong>\n<\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/2915\/how-to-build-a-jenkins-build-server\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Build a Jenkins Build Server \u2013 CloudSavvy IT&#8221; Jenkins Continuous integration and continuous deployment are two of the core principals of DevOps. Automating the build and deployment processes enables software development teams to make smaller changes more often. Automation limits bugs due to code other team members write, as the code was checked&#8230;<\/p>\n","protected":false},"author":1,"featured_media":284992,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2019\/11\/8c35d4e1.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-284991","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/284991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=284991"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/284991\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/284992"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=284991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=284991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=284991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}