<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jenkins Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/category/jenkins/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/category/jenkins/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Mon, 19 Jun 2023 13:29:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Top 50 Jenkin Pipeline Interview Questions with Answers</title>
		<link>https://www.scmgalaxy.com/tutorials/top-50-jenkin-pipeline-interview-questions-with-answers/</link>
					<comments>https://www.scmgalaxy.com/tutorials/top-50-jenkin-pipeline-interview-questions-with-answers/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 03 May 2023 08:19:12 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=10400</guid>

					<description><![CDATA[<p>1. What is a Jenkins pipeline? a) A coding script used to automate software developmentb) A graphical user interface for [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/top-50-jenkin-pipeline-interview-questions-with-answers/">Top 50 Jenkin Pipeline Interview Questions with Answers</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="696" height="238" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2023/05/image-90.png" alt="" class="wp-image-10401" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2023/05/image-90.png 696w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2023/05/image-90-300x103.png 300w" sizes="(max-width: 696px) 100vw, 696px" /><figcaption class="wp-element-caption"><strong><em>Jenkin Pipeline Interview Questions with Answers</em></strong></figcaption></figure>
</div>


<h3 class="wp-block-heading">1. What is a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A coding script used to automate software development<br>b) A graphical user interface for managing Jenkins jobs<br>c) A tool used to manage Jenkins plugins<br>d) All of the above</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">2. What is the difference between declarative and scripted pipelines?</h3>



<p class="wp-block-paragraph">a) Declarative pipelines use a predefined set of steps, while scripted pipelines allow users to write custom scripts.<br>b) Declarative pipelines use a graphical user interface, while scripted pipelines are coded by hand.<br>c) Declarative pipelines support parallelism and stage-level error handling, while scripted pipelines do not.<br>d) Declarative pipelines are deprecated in favor of scripted pipelines.</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">3. What is the purpose of the &#8220;agent&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To specify the location where the pipeline is run<br>b) To define the steps that make up the pipeline<br>c) To specify the credentials used to run the pipeline<br>d) To set environment variables for the pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">4. How do you define a parameter in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) Using the &#8220;parameters&#8221; directive<br>b) Using the &#8220;property&#8221; directive<br>c) Using the &#8220;input&#8221; directive<br>d) Parameters cannot be defined in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">5. What is a Jenkinsfile?</h3>



<p class="wp-block-paragraph">a) A file that defines a Jenkins pipeline<br>b) A file that stores Jenkins plugin configurations<br>c) A file that contains the results of a Jenkins build<br>d) A file that defines Jenkins global variables</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">6. How do you specify a conditional statement in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) Using the &#8220;if&#8221; directive<br>b) Using the &#8220;when&#8221; directive<br>c) Using the &#8220;switch&#8221; directive<br>d) Conditional statements cannot be used in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">7. What is the purpose of the &#8220;input&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To pause the pipeline and wait for user input<br>b) To define parameters for the pipeline<br>c) To specify the location where the pipeline is run<br>d) To set environment variables for the pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">8. How do you trigger a downstream job in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) Using the &#8220;build&#8221; directive<br>b) Using the &#8220;trigger&#8221; directive<br>c) Using the &#8220;stage&#8221; directive<br>d) Downstream jobs cannot be triggered in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">9. What is the purpose of the &#8220;stage&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To define steps that make up the pipeline<br>b) To group pipeline steps into stages<br>c) To define environment variables for the pipeline<br>d) To specify the location where the pipeline is run</p>



<h4 class="wp-block-heading">Answer: b)</h4>



<h3 class="wp-block-heading">10. What is the purpose of the &#8220;when&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To define parallelism in the pipeline<br>b) To specify conditions that must be met before a step can run<br>c) To trigger downstream jobs<br>d) To define custom functions used in the pipeline</p>



<h4 class="wp-block-heading">Answer: b)</h4>



<h3 class="wp-block-heading">11. How do you define environment variables in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) Using the &#8220;properties&#8221; directive<br>b) Using the &#8220;pipeline&#8221; directive<br>c) Using the &#8220;env&#8221; directive<br>d) Environment variables cannot be defined in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: c)</h4>



<h3 class="wp-block-heading">12. What is the &#8220;stash&#8221; and &#8220;unstash&#8221; commands in Jenkins?</h3>



<p class="wp-block-paragraph">a) Commands used for version control in Jenkins<br>b) Commands used to archive files in Jenkins<br>c) Commands used to share files between nodes in a Jenkins pipeline<br>d) Commands used to install plugins in Jenkins</p>



<h4 class="wp-block-heading">Answer: c)</h4>



<h3 class="wp-block-heading">13. What is the purpose of the &#8220;noStash&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To ignore archived files during the pipeline run<br>b) To force files to be archived during the pipeline run<br>c) To exclude specific stages from the pipeline run<br>d) The &#8220;noStash&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">14. What is the &#8220;sh&#8221; and &#8220;bat&#8221; commands in Jenkins?</h3>



<p class="wp-block-paragraph">a) Commands used to switch between operating systems in Jenkins<br>b) Commands used to execute shell scripts and batch files in Jenkins<br>c) Commands used to archive files in Jenkins<br>d) Commands used to share files between nodes in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: b)</h4>



<h3 class="wp-block-heading">15. How do you create a custom function in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) Using the &#8220;function&#8221; directive<br>b) Using the &#8220;script&#8221; directive<br>c) Custom functions cannot be used in a Jenkins pipeline<br>d) Using the &#8220;plugin&#8221; directive</p>



<h4 class="wp-block-heading">Answer: b)</h4>



<h3 class="wp-block-heading">16. What is the &#8220;timeout&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A directive used to specify the maximum time a step can run before timing out<br>b) A directive used to pause the pipeline for a specified amount of time<br>c) A directive used to specify the maximum time the pipeline can run before timing out<br>d) The &#8220;timeout&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">17. How do you trigger a Jenkins pipeline using a webhook?</h3>



<p class="wp-block-paragraph">a) Using the Jenkins API<br>b) Using the &#8220;webhook&#8221; directive<br>c) Using a Jenkins plugin<br>d) Triggering a Jenkins pipeline via webhook is not possible</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">18. What is a &#8220;floating point&#8221; in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A directive used for floating point arithmetic<br>b) A Jenkins plugin used for real-time monitoring<br>c) A Jenkins feature used for dynamic scaling of resources<br>d) Floating point is not a valid concept in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: d)</h4>



<h3 class="wp-block-heading">19. What is the purpose of the &#8220;post&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To define cleanup steps that should be run after the pipeline completes<br>b) To define steps that make up the pipeline<br>c) To group pipeline steps into stages<br>d) The &#8220;post&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">20. What is the purpose of the &#8220;tools&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To specify the tools needed for the pipeline<br>b) To define custom functions used in the pipeline<br>c) To group pipeline steps into stages<br>d) Tools cannot be specified in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">21. What is the &#8220;archiveArtifacts&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to archive artifacts generated during the pipeline run<br>b) A command used to deploy artifacts to a remote location<br>c) A command used to run tests on artifacts generated during the pipeline run<br>d) The &#8220;archiveArtifacts&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">22. What is the &#8220;environment&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A directive used to define environment variables used by the pipeline<br>b) A directive used to set the location where the pipeline is run<br>c) A directive used to specify the tools needed for the pipeline<br>d) The &#8220;environment&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">23. What is the &#8220;parallel&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A directive used to define parallelism in the pipeline<br>b) A directive used to set environment variables for the pipeline<br>c) A directive used to group pipeline steps into stages<br>d) The &#8220;parallel&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">24. What is the &#8220;buildDiscarder&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A directive used to define how long builds should be stored in the pipeline history<br>b) A directive used to trigger downstream jobs<br>c) A directive used to archive artifacts generated during the pipeline run<br>d) The &#8220;buildDiscarder&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">25. How do you define a global variable in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) Using the &#8220;globals&#8221; directive<br>b) Using the &#8220;properties&#8221; directive<br>c) Using the &#8220;global&#8221; directive<br>d) Global variables cannot be defined in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: d)</h4>



<h3 class="wp-block-heading">26. What is the &#8220;retry&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to retry a failed step in the pipeline<br>b) A command used to retry the entire pipeline<br>c) A command used to retry a downstream job<br>d) The &#8220;retry&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">27. What is the purpose of the &#8220;parameters&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To define parameters used by the pipeline<br>b) To specify the location where the pipeline is run<br>c) To group pipeline steps into stages<br>d) The &#8220;parameters&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">28. What is the &#8220;cron&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to trigger a pipeline at a specified time<br>b) A command used to set environment variables for the pipeline<br>c) A command used to pause the pipeline for a specified amount of time<br>d) The &#8220;cron&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">29. What is the &#8220;fileExists&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to test whether a file exists<br>b) A command used to create a file<br>c) A command used to archive a file<br>d) The &#8220;fileExists&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">30. What is the &#8220;timestamps&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to add timestamps to pipeline output<br>b) A command used to set the location where the pipeline is run<br>c) A command used to trigger downstream jobs<br>d) The &#8220;timestamps&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">31. What is the &#8220;node&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A directive used to specify the node where the pipeline is run<br>b) A directive used to group pipeline steps into stages<br>c) A directive used to define custom functions used in the pipeline<br>d) The &#8220;node&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">32. What is the &#8220;params&#8221; variable in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A variable that contains the parameters passed to the pipeline<br>b) A variable used to store custom programming functions<br>c) A variable used to store environment variables<br>d) The &#8220;params&#8221; variable is not a valid variable in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">33. What is the &#8220;dir&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to change the working directory in the pipeline<br>b) A command used to deploy artifacts to a remote location<br>c) A command used to trigger downstream jobs<br>d) The &#8220;dir&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">34. What is the &#8220;stashSize&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) A directive used to specify the maximum size of archived files<br>b) A directive used to specify the number of files to archive<br>c) A directive used to set environment variables for the pipeline<br>d) The &#8220;stashSize&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">35. What is the purpose of the &#8220;retryWhen&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To specify the conditions under which a step should be retried<br>b) To specify the maximum number of times a step should be retried<br>c) To specify the duration between retries of a failed step<br>d) The &#8220;retryWhen&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">36. What is the purpose of the &#8220;results&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To specify the location where the pipeline is run<br>b) To set environment variables for the pipeline<br>c) To define cleanup steps that should be run after the pipeline completes<br>d) The &#8220;results&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: c)</h4>



<h3 class="wp-block-heading">37. What is the &#8220;confirm&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to pause the pipeline and wait for user input<br>b) A command used to run tests on artifacts generated during the pipeline run<br>c) A command used to intelligently retry failed steps in the pipeline<br>d) The &#8220;confirm&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">38. What is the &#8220;mail&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to send email notifications at a specified stage of the pipeline<br>b) A command used to archive artifacts generated during the pipeline run<br>c) A command used to run tests on artifacts generated during the pipeline run<br>d) The &#8220;mail&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">39. What is the &#8220;git&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to integrate with Git for version control<br>b) A command used to deploy artifacts to a remote location<br>c) A command used to archive artifacts generated during the pipeline run<br>d) The &#8220;git&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">40. What is the purpose of the &#8220;inputMessage&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To define the message displayed when the pipeline is paused for user input<br>b) To define the message included in email notifications<br>c) To define a custom error message for failed pipeline steps<br>d) The &#8220;inputMessage&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">41. What is the &#8220;postBuild&#8221; directive in Jenkins?</h3>



<p class="wp-block-paragraph">a) A directive used to define cleanup steps that should be run after the pipeline completes<br>b) A directive used to specify the location where the pipeline is run<br>c) A directive used to define custom functions used in the pipeline<br>d) The &#8220;postBuild&#8221; directive is not a valid directive in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">42. What is the &#8220;ignoreErrors&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to ignore errors during the pipeline run<br>b) A command used to archive artifacts generated during the pipeline run<br>c) A command used to pause the pipeline for a specified amount of time<br>d) The &#8220;ignoreErrors&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">43. What is the &#8220;step&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to define steps in the pipeline<br>b) A command used to store environment variables<br>c) A command used to pause the pipeline for a specified amount of time<br>d) The &#8220;step&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">44. What is the purpose of the &#8220;withAnt&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To specify the Ant version used by the pipeline<br>b) To set environment variables for the pipeline<br>c) To archive artifacts generated during the pipeline run<br>d) The &#8220;withAnt&#8221; directive is not a valid directive in a Jenkins pipeline</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">45. What is the &#8220;batLabel&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to trigger a downstream job on a specified label<br>b) A command used to deploy artifacts to a remote location<br>c) A command used to run batch files in the pipeline<br>d) The &#8220;batLabel&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: c)</h4>



<h3 class="wp-block-heading">46. What is the &#8220;try&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to retry failed steps in the pipeline<br>b) A command used to run tests on artifacts generated during the pipeline run<br>c) A command used to archive artifacts generated during the pipeline run<br>d) The &#8220;try&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">47. What is the purpose of the &#8220;unstable&#8221; result in Jenkins?</h3>



<p class="wp-block-paragraph">a) To indicate that the pipeline completed but with some issues<br>b) To indicate that the pipeline failed<br>c) To indicate that the pipeline has not yet completed<br>d) The &#8220;unstable&#8221; result is not a valid concept in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">48. What is the &#8220;file&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) A command used to create a file in the pipeline<br>b) A command used to patch a file during the pipeline run<br>c) A command used to delete a file during the pipeline run<br>d) The &#8220;file&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">49. What is the purpose of the &#8220;stashExists&#8221; command in Jenkins?</h3>



<p class="wp-block-paragraph">a) To test whether a specific stash exists<br>b) To create a stash<br>c) To store a stash on a remote node<br>d) The &#8220;stashExists&#8221; command is not a valid command in Jenkins</p>



<h4 class="wp-block-heading">Answer: a)</h4>



<h3 class="wp-block-heading">50. What is the purpose of the &#8220;properties&#8221; directive in a Jenkins pipeline?</h3>



<p class="wp-block-paragraph">a) To set environment variables for the pipeline<br>b) To define custom functions used in the pipeline<br>c) To define parameters used by the pipeline<br>d) To define cleanup steps that should be run after the pipeline completes</p>



<h4 class="wp-block-heading">Answer: a)</h4>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/top-50-jenkin-pipeline-interview-questions-with-answers/">Top 50 Jenkin Pipeline Interview Questions with Answers</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/top-50-jenkin-pipeline-interview-questions-with-answers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to execute grovvy script remotely on Jenkins server?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-execute-grovvy-script-remotely-on-jenkins-server/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-execute-grovvy-script-remotely-on-jenkins-server/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 17 May 2018 04:17:02 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[grovvy]]></category>
		<category><![CDATA[Remotely]]></category>
		<category><![CDATA[script]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4964</guid>

					<description><![CDATA[<p>A Jenkins Admin can execute groovy scripts remotely by sending an HTTP POST request to /script/ url or /scriptText/. curl [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-execute-grovvy-script-remotely-on-jenkins-server/">How to execute grovvy script remotely on Jenkins server?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignnone size-full wp-image-4975" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-server-and-groovy.png" alt="" width="600" height="350" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-server-and-groovy.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-server-and-groovy-300x175.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>A Jenkins Admin can execute groovy scripts remotely by sending an HTTP POST request to /script/ url or /scriptText/.</p>
<p><strong>curl example via bash</strong></p>
<pre class="brush: plain; title: ; notranslate">
curl -d &quot;script=&amp;lt;your_script_here&amp;gt;&quot; https://jenkins/script
# or to get output as a plain text result (no HTML)
curl -d &quot;script=&amp;lt;your_script_here&amp;gt;&quot; https://jenkins/scriptText
</pre>
<p><strong>curl submitting groovy file via bash</strong></p>
<pre class="brush: plain; title: ; notranslate">
curl --data-urlencode &quot;script=$(&amp;lt; ./somescript.groovy)&quot; https://jenkins/scriptText
</pre>
<p><strong>curl submitting groovy file providing username and password via bash</strong></p>
<pre class="brush: plain; title: ; notranslate">
curl --user 'username:password' --data-urlencode &quot;script=$(&amp;lt; ./somescript.groovy)&quot; https://jenkins/scriptText
</pre>
<p><strong>Jenkins CLI offers the possibility to execute groovy scripts remotely using groovy command or execute groovy interactivelly via groovysh.</strong></p>
<pre class="brush: plain; title: ; notranslate">
java -jar jenkins-cli.jar -noCertificateCheck -s https://10.0.0.91/ groovy disableEnableJobsMatchingPattern.groovy jobPattern=build_git_auto disableOrEnable=disable --username 12345 --password banana
</pre>
<p><strong>Reference</strong><br />
https://wiki.jenkins.io/display/JENKINS/Jenkins+Script+Console</p>
<p><iframe title="Jenkins World 2017: Mastering the Jenkins Script Console" width="900" height="506" src="https://www.youtube.com/embed/qaUPESDcsGg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p><iframe loading="lazy" title="Jenkins Area Meetup - Hacking on Jenkins Internals - Jenkins Script Console" width="900" height="675" src="https://www.youtube.com/embed/T1x2kCGRY1w?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-execute-grovvy-script-remotely-on-jenkins-server/">How to execute grovvy script remotely on Jenkins server?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-execute-grovvy-script-remotely-on-jenkins-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to run/execute groovy script in Jenkins?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-run-execute-groovy-script-in-jenkins/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-run-execute-groovy-script-in-jenkins/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 17 May 2018 04:14:47 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[Groovy plugin]]></category>
		<category><![CDATA[Jenkins script console]]></category>
		<category><![CDATA[Scriptler Plugins]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4962</guid>

					<description><![CDATA[<p>Here are the List of way using you can apply grovy code in Jenkins Method -1: Groovy plugin This plugin [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-run-execute-groovy-script-in-jenkins/">How to run/execute groovy script in Jenkins?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4978" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/groovy-script-in-Jenkins.png" alt="" width="600" height="350" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/groovy-script-in-Jenkins.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/groovy-script-in-Jenkins-300x175.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p>Here are the List of way using you can apply grovy code in Jenkins</p>
<p><strong>Method -1: Groovy plugin</strong><br />
This plugin adds the ability to directly execute Groovy code.<br />
More info &#8211; https://wiki.jenkins.io/display/JENKINS/Groovy+plugin</p>
<p><strong>Method -2: Jenkins script console</strong><br />
The inbuilt script console is a very useful and powerful Jenkins extension and ideally suits certain types of tasks. This simple but powerful built-in web console allows you to run Groovy scripts on your Jenkins instance (or its slave nodes) from directly within the user interface, and is installed as standard.</p>
<p>To access the console, either navigate to Manage Jenkins and then select Script Console, or simply append /script to your Jenkins host and port, like this for example: http://jenkinshost:8080/script<br />
Running Script Console on the master<br />
This feature can be accessed from &#8220;Manage Jenkins&#8221; &gt; &#8220;Script Console&#8221;. Or visit the sub-URL /script on your Jenkins instance.</p>
<p>Running Script Console on agents<br />
Visit &#8220;Manage Jenkins&#8221; &gt; &#8220;Manage Nodes&#8221;. Select any node to view the status page. In the menu on the left, a menu item is available to open a &#8220;Script Console&#8221; on that specific agent.</p>
<p>More info &#8211; https://wiki.jenkins.io/display/JENKINS/Jenkins+Script+Console</p>
<p><strong>Method -3: Scriptler Plugins</strong><br />
Scriptler allows you to store/edit groovy scripts and execute it on any of the slaves/nodes&#8230; no need to copy/paste groovy code anymore.<br />
More Info &#8211; https://wiki.jenkins.io/display/JENKINS/Scriptler+Plugin</p>
<p><strong>Reference</strong></p>
<p>https://wiki.jenkins.io/display/JENKINS/Jenkins+Script+Console</p>
<p><iframe loading="lazy" title="Jenkins World 2017: Mastering the Jenkins Script Console" width="900" height="506" src="https://www.youtube.com/embed/qaUPESDcsGg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>&nbsp;</p>
<p><iframe loading="lazy" title="Jenkins Area Meetup - Hacking on Jenkins Internals - Jenkins Script Console" width="900" height="675" src="https://www.youtube.com/embed/T1x2kCGRY1w?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-run-execute-groovy-script-in-jenkins/">How to run/execute groovy script in Jenkins?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-run-execute-groovy-script-in-jenkins/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Database of Groovy Script for Jenkins Automation</title>
		<link>https://www.scmgalaxy.com/tutorials/database-of-groovy-script-for-jenkins-automation/</link>
					<comments>https://www.scmgalaxy.com/tutorials/database-of-groovy-script-for-jenkins-automation/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 17 May 2018 04:10:33 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[groovy]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4960</guid>

					<description><![CDATA[<p>Here are the list of Groovy Script which can be used in Jenkins to automate the JOBs and CI process. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/database-of-groovy-script-for-jenkins-automation/">Database of Groovy Script for Jenkins Automation</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone  wp-image-4987" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/groovy-script-jenkins-automation-1.png" alt="" width="603" height="352" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/groovy-script-jenkins-automation-1.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/groovy-script-jenkins-automation-1-300x175.png 300w" sizes="auto, (max-width: 603px) 100vw, 603px" /></p>
<p>Here are the list of Groovy Script which can be used in Jenkins to automate the JOBs and CI process. Please add your list in the comment sections as well.</p>
<p><strong>Main Source &#8211; </strong></p>
<ul>
<li>https://github.com/scmgalaxy/jenkins-groovy-script-example</li>
<li>https://github.com/cloudbees/jenkins-scripts</li>
<li>https://wiki.jenkins.io/display/JENKINS/Jenkins+Script+Console</li>
<li>https://pghalliday.com/jenkins/groovy/sonar/chef/configuration/management/2014/09/21/some-useful-</li>
<li>jenkins-groovy-scripts.html</li>
<li>https://github.com/cloudbees/jenkins-scripts</li>
<li>https://github.com/jenkinsci/jenkins-scripts</li>
<li>https://gist.github.com/dnozay/e7afcf7a7dd8f73a4e05</li>
<li>https://github.com/samrocketman/jenkins-bootstrap-shared</li>
<li>https://github.com/samrocketman/jenkins-script-console-scripts</li>
</ul>
<p><strong>Example Groovy Script </strong></p>
<ul class="childpages-macro conf-macro output-block" data-hasbody="false" data-macro-name="children">
<li><a href="https://wiki.jenkins.io/display/JENKINS/Activate+Chuck+Norris+Plugin">Activate Chuck Norris Plugin</a> — <span class="smalltext">This script activates Chuck Norris plugin for all jobs in your Jenkins server</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Add+a+Maven+Installation%2C+Tool+Installation%2C+Modify+System+Config">Add a Maven Installation, Tool Installation, Modify System Config</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Add+a+new+label+to+slaves+meeting+a+condition">Add a new label to slaves meeting a condition</a> — <span class="smalltext">This script shows how to alter the slave nodes&#8217; label membership. In this case we create a new label if the existing label contains a string. It has been tested from the Jenkins command window.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Add+notification+plugin+to+every+job">Add notification plugin to every job</a> — <span class="smalltext">This script will add the Notification Plugin to every job.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Allow+broken+build+claiming+on+every+jobs">Allow broken build claiming on every jobs</a> — <span class="smalltext">With the following simple script, you can activate the option on every jobs of your server in just one go.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Batch-Update+Mercurial+branch+that+is+checked+out">Batch-Update Mercurial branch that is checked out</a> — <span class="smalltext">Updates for multiple jobs which branch will be checked out from Hg</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Bulk+rename+projects">Bulk rename projects</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Change+JVM+Options+in+all+Maven+tasks+of+Freestyle+Jobs">Change JVM Options in all Maven tasks of Freestyle Jobs</a> — <span class="smalltext">This script find all Maven Tasks registered in freestyle jobs and replace JVM Options by a new value.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Change+publish+over+SSH+configuration">Change publish over SSH configuration</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Change+SCMTrigger+for+each+project+to+disable+during+the+night+and+the+week-end">Change SCMTrigger for each project to disable during the night and the week-end</a> — <span class="smalltext">This script lets you easily change all jobs running every minutes so that it gets disabled between 21:00 and 07:00 and on Saturday and Sunday.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Change+Version-Number+in+SVN-path">Change Version-Number in SVN-path</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Clone+all+projects+in+a+View">Clone all projects in a View</a> — <span class="smalltext">This script enumerates all projects belonging to a specific view and clones them.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Convert+standard+mail+notifications+to+use+the+Mail-Ext+Publisher+plugin">Convert standard mail notifications to use the Mail-Ext Publisher plugin</a> — <span class="smalltext">This script replace mail notifications in all projects by Mail-Ext publisher plugin and re-uses existing recipients.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Delete+.tmp+files+left+in+workspace-files">Delete .tmp files left in workspace-files</a> — <span class="smalltext">This scripts deletes all the tmp files left in workspace-files directory after the build. On windows servers, this seems pretty common so we run this script on daily basis.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Delete+workspace+for+all+disabled+jobs">Delete workspace for all disabled jobs</a> — <span class="smalltext">Deletes the workspace for all disabled jobs to save space</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Disable+all+jobs">Disable all jobs</a> — <span class="smalltext">This script disables all jobs in your Jenkins server</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Display+Information+About+Nodes">Display Information About Nodes</a> — <span class="smalltext">This scripts displays a bunch of information about all the slave nodes.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Display+job+parameters">Display job parameters</a> — <span class="smalltext">This scripts displays the parameters for all the jobs along with their default values (if applicable).</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Display+jobs+group+by+the+build+steps+they+use">Display jobs group by the build steps they use</a></li>
<li><a href="https://wiki.jenkins.io/pages/viewpage.action?pageId=67569264">Display list of projects that were built more than 1 day ago.</a> — <span class="smalltext">This script to display list of projects that were built more than 1 day ago.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Display+mail+notifications+recipients">Display mail notifications recipients</a> — <span class="smalltext">This script displays for all jobs the list of mail recipients used for notifications.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Display+monitors+status">Display monitors status</a> — <span class="smalltext">Jenkins uses monitors to validate various behaviors. If you dismiss one, Jenkins will never propose you to reactivate it. This script allows you to check the status of all monitors and to reactive them.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Display+timer+triggers">Display timer triggers</a> — <span class="smalltext">This scripts displays the timer triggers for all the jobs in order to better arrange them.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Display+Tools+Location+on+All+Nodes">Display Tools Location on All Nodes</a> — <span class="smalltext">This script can help to get Jenkins tools localtion on all your slaves</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Enable+Timestamper+plugin+on+all+jobs">Enable Timestamper plugin on all jobs</a> — <span class="smalltext">With the following simple script, you can activate the option on every jobs of your server in just one go.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Failed+Jobs">Failed Jobs</a> — <span class="smalltext">This scripts displays a list of all failed jobs. Addon: restart them.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Find+builds+currently+running+that+has+been+executing+for+more+than+N+seconds">Find builds currently running that has been executing for more than N seconds</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Grant+Cancel+Permission+for+user+and+group+that+have+Build+permission">Grant Cancel Permission for user and group that have Build permission</a> — <span class="smalltext">This script will go through all groups and users in both Global security and per job security settings.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Invalidate+Jenkins+HTTP+sessions">Invalidate Jenkins HTTP sessions</a> — <span class="smalltext">This script can monitor and invalidate HTTP sessions if there are many open ones on your server.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Manually+run+log+rotation+on+all+jobs">Manually run log rotation on all jobs</a> — <span class="smalltext">Runs log rotation on all jobs to free space</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Monitor+and+Restart+Offline+Slaves">Monitor and Restart Offline Slaves</a> — <span class="smalltext">This script can monitor and restart offline nodes if they are not disconnected manually.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Monitoring+Scripts">Monitoring Scripts</a> — <span class="smalltext">Several scripts to display data about http sessions, threads, memory, JVM or MBeans, when using the Monitoring plugin.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Parameterized+System+Groovy+script">Parameterized System Groovy script</a> — <span class="smalltext">This script will demonstrate how to get parameters in a system groovy script.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Preselect+username+in+Maven+Release+Build">Preselect username in Maven Release Build</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Printing+a+list+of+credentials+and+their+IDs">Printing a list of credentials and their IDs</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Remove+all+disabled+modules+in+Maven+jobs">Remove all disabled modules in Maven jobs</a> — <span class="smalltext">To remove all disabled modules in Maven jobs</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Remove+Deployed+Artifacts+Actions">Remove Deployed Artifacts Actions</a> — <span class="smalltext">This script is used to remove the Deployed Artifacts list that is uselessly stored for each build by the Artifact Deployer Plugin.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData">Remove Git Plugin BuildsByBranch BuildData</a> — <span class="smalltext">This script is used to remove the static list of BuildsByBranch that is uselessly stored for each build by the Git Plugin.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Set+GitBlitRepositoryBrowser+with+custum+settings+on+all+repos">Set GitBlitRepositoryBrowser with custum settings on all repos</a> — <span class="smalltext">This scripts allows to update the repo browser. Can be adapted to any other browser, not only gitblit.</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Update+maven+jobs+to+use+the+post+build+task+to+deploy+artifacts">Update maven jobs to use the post build task to deploy artifacts</a> — <span class="smalltext">This script updates all maven jobs having a deploy goal by install and activate the post build step to deploy artifacts at the end of the build</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Update+SVN+Browser">Update SVN Browser</a></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Wipe+out+workspaces+of+all+jobs">Wipe out workspaces of all jobs</a> — <span class="smalltext">This script wipes out the workspaces of all jobs on your Jenkins server</span></li>
<li><a href="https://wiki.jenkins.io/display/JENKINS/Wipe+workspaces+for+a+set+of+jobs+on+all+nodes">Wipe workspaces for a set of jobs on all nodes</a> — <span class="smalltext">The script wipes workspaces of certain jobs on all nodes</span></li>
</ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/database-of-groovy-script-for-jenkins-automation/">Database of Groovy Script for Jenkins Automation</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/database-of-groovy-script-for-jenkins-automation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jenkins Architecture Explained!!!</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-architecture-explained/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-architecture-explained/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 15 May 2018 13:19:11 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[slave]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4955</guid>

					<description><![CDATA[<p>Jenkins is continuous integration tools which help to integrate other tools to automate the software development activity and repetitive tasks. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-architecture-explained/">Jenkins Architecture Explained!!!</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4990" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-architecture-explained.png" alt="" width="600" height="350" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-architecture-explained.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-architecture-explained-300x175.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p>Jenkins is continuous integration tools which help to integrate other tools to automate the software development activity and repetitive tasks. Jenkins has 2 releases. One, Community version which open source and free and another one is Jenkins Enterprise which is from Cloud bees for enterprise. Jenkins is extremely powerful with vast amount of plug-in supported. Jenkins is one of the most active open source projects so learning and finding the information is easily available on the internet. Jenkins uses master/slave architecture to manage distributed builds.<br />
Jenkins Architecture</p>
<p>Jenkins Architecture is based on the distributed. This has 2 components.</p>
<ul>
<li>Jenkins Server</li>
<li>Jenkins Node/Slave/Build Server</li>
</ul>
<p>Jenkins server is a web dashboard which is nothing but powered from a war file, default run on 8080 ports. Using Dashboard, You can configure the Jobs/Projects but the build takes place in Nodes/Slave. By default one Nodes/Slave is configured and running in Jenkins Server. You can add more Nodes/Slave as well using IP address, user name, Password using the ssh/jnlp/webstart methods.</p>
<p>Your main Jenkins server is the master. In short, the master’s job is to handle scheduling build jobs, dispatching builds to the slaves for the actual execution, monitor the slaves (possibly taking them online and offline as required) and recording and presenting the build results. Even in a distributed architecture, a master instance of Jenkins can also execute build jobs directly.</p>
<p>The job of the slaves is to do as they are configured in the Jenkins Server, which involves executing build jobs dispatched by the master. You can configure a project to always run on a particular slave machine, or a particular type of slave machine, or simply let Jenkins pick the next available slave.<br />
Jenkins is developed using Java and Java is platform independent thus Jenkins servers and nodes/slave can be configured in any servers including Windows, Linux and Mac.</p>
<p><a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-architecture-master-slave.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4956" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-architecture-master-slave.jpg" alt="" width="600" height="425" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-architecture-master-slave.jpg 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/05/jenkins-architecture-master-slave-300x213.jpg 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-architecture-explained/">Jenkins Architecture Explained!!!</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-architecture-explained/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Difference between jenkins and Urbancode build</title>
		<link>https://www.scmgalaxy.com/tutorials/difference-between-jenkins-and-urbancode-build/</link>
					<comments>https://www.scmgalaxy.com/tutorials/difference-between-jenkins-and-urbancode-build/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 02 Apr 2018 01:43:18 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[uBuild]]></category>
		<category><![CDATA[Compare]]></category>
		<category><![CDATA[Difference]]></category>
		<category><![CDATA[Urbancode build]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4879</guid>

					<description><![CDATA[<p>What is the difference between jenkins and Urbancode build? jenkins Urbancode build Jenkins is open framework for automating the repeative [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/difference-between-jenkins-and-urbancode-build/">Difference between jenkins and Urbancode build</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3>What is the difference between jenkins and Urbancode build?</h3>
<table border="1" width="100%">
<tbody>
<tr>
<td>jenkins</td>
<td>Urbancode build</td>
</tr>
<tr>
<td>Jenkins is open framework for automating the repeative tasks and has great plugins which can be used to create entire automated customized continous integration framework.</td>
<td>Urbancode build(uBuild) is for automating the repeative tasks and has great limited sets of plugins which can be used to create entire automated continous integration flow.</td>
</tr>
<tr>
<td>Jenkins can deliver core CI loop: Detect a change, do a build, test, and deliver feedback and its open framework allows and can be used for software Deployment as well.</td>
<td>Urbancode build(uBuild) can deliver core CI loop: Detect a change, do a build, test, and deliver feedback but it can be not be used for deployment. Urbancode Deploy(uDeploy) is another product by IBM which can be used for deployment.</td>
</tr>
<tr>
<td>Jenkins can be extended with Large sets of plugins https://plugins.jenkins.io/</td>
<td>Urbancode build(uBuild) can be extended with Limited sets of plugins https://developer.ibm.com/urbancode/plugins/</td>
</tr>
<tr>
<td>Jenkins is one of top active Open Source and free developed in Java.</td>
<td>Urbancode build(uBuild) is properiety tool by IBM, previously known as Urbancode and developed in Java</td>
</tr>
<tr>
<td>Jenkins has plugins which needs extra learning curve by development teams for centrally defined templates</td>
<td>Urbancode build(uBuild) has built-in Easy addition of new projects by development teams based on centrally defined templates</td>
</tr>
<tr>
<td>Jenkins has Dependency management and but not awareness. Build based on project relationships.</td>
<td>Urbancode build(uBuild) has Dependency management and awareness. Build based on project relationships.</td>
</tr>
</tbody>
</table>
<h3>My Recommendation &#8211; Jenkins</h3>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/difference-between-jenkins-and-urbancode-build/">Difference between jenkins and Urbancode build</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/difference-between-jenkins-and-urbancode-build/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Enabling Jenkins integration with Silk Central Test Manager</title>
		<link>https://www.scmgalaxy.com/tutorials/enabling-jenkins-integration-with-silk-central-test-manager/</link>
					<comments>https://www.scmgalaxy.com/tutorials/enabling-jenkins-integration-with-silk-central-test-manager/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 12:07:09 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Silk Central Test Manager]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4721</guid>

					<description><![CDATA[<p>Enabling Jenkins integration with Silk Central Test Manager Enabling jenkins integration with silk central test manager</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/enabling-jenkins-integration-with-silk-central-test-manager/">Enabling Jenkins integration with Silk Central Test Manager</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2 class="elgg-heading-main">Enabling Jenkins integration with Silk Central Test Manager</h2>
<p><strong><a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/01/Enabling-jenkins-integration-with-silk-central-test-manager.pdf">Enabling jenkins integration with silk central test manager</a></strong></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/enabling-jenkins-integration-with-silk-central-test-manager/">Enabling Jenkins integration with Silk Central Test Manager</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/enabling-jenkins-integration-with-silk-central-test-manager/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jenkins Remote access API Example &#124; Jenkins Tutorial</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-remote-access-api-example/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-remote-access-api-example/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 24 Feb 2017 12:14:09 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[Jenkins Tutorial]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[Remote access API]]></category>
		<category><![CDATA[Remote API]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/02/24/jenkins-remote-access-api-example/</guid>

					<description><![CDATA[<p>Jenkins Remote access API Example Jenkins provides machine-consumable remote access API to its functionalities. Currently it comes in three flavors: [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-remote-access-api-example/">Jenkins Remote access API Example | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img loading="lazy" decoding="async" class="aligncenter wp-image-3002 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/jenkins-remote-access-api-e.png" alt="jenkins-remote-access-api-example" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/jenkins-remote-access-api-e.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/02/jenkins-remote-access-api-e-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></div>
<div></div>
<div><strong>Jenkins Remote access API Example</strong></div>
<div></div>
<div><strong>Jenkins provides machine-consumable remote access API to its functionalities. Currently it comes in three flavors:</strong></div>
<div></div>
<div>XML</div>
<div>JSON with JSONP support</div>
<div>Python</div>
<div></div>
<div>Remote access API is offered in a REST-like style. That is, there is no single entry point for all features, and instead they are available under the &#8220;&#8230;/api/&#8221; URL where &#8220;&#8230;&#8221; portion is the data that it acts on.</div>
<div></div>
<div>For example, if your Jenkins installation sits at http://ci.jruby.org/, visiting http://ci.jruby.org/api/ will show just the top-level API features available – primarily a listing of the configured jobs for this Jenkins instance.</div>
<div></div>
<div>Or if you want to access information about a particular build, e.g. http://ci.jruby.org/job/jruby-base/lastSuccessfulBuild/, then go to http://ci.jruby.org/job/jruby-base/lastSuccessfulBuild/api/ and you&#8217;ll see the list of functionalities for that build.</div>
<div></div>
<div><strong>Remote API can be used to do things like these:</strong></div>
<div></div>
<div>Retrieve information from Jenkins for programmatic consumption.</div>
<div>trigger a new build</div>
<div>create/copy jobs</div>
<div></div>
<div></div>
<div>Jobs with parameters, Also see Parameterized Build.</div>
<div>Simple example &#8211; sending &#8220;String Parameters&#8221;:</div>
<div>curl -X POST JENKINS_URL/job/JOB_NAME/build \</div>
<div>  &#8211;data token=TOKEN \</div>
<div>  &#8211;data-urlencode json='{&#8220;parameter&#8221;: [{&#8220;name&#8221;:&#8221;id&#8221;, &#8220;value&#8221;:&#8221;123&#8243;}, {&#8220;name&#8221;:&#8221;verbosity&#8221;, &#8220;value&#8221;:&#8221;high&#8221;}]}&#8217;</div>
<div></div>
<div><strong>Check Jenkins Job Status via REST API</strong></div>
<div></div>
<div>job_status=`curl https://jenkins/view/job/other-job/lastBuild/api/json | grep &#8220;\&#8221;result\&#8221;:\&#8221;SUCCESS\&#8221;&#8221;`</div>
<pre>if [ -n "$job_status" ] then     # Run your script commands here else   echo "BUILD FAILURE: Other build is unsuccessful or status could not be obtained."   exit 1 fi</pre>
<div></div>
<div></div>
<div><strong>How to restart Jenkins manually?</strong></div>
<div></div>
<div>To restart Jenkins manually, you can use either of the following commands:</div>
<div>(jenkins_url)/safeRestart &#8211; Allows all running jobs to complete. New jobs will remain in the queue to run after the restart is complete.</div>
<div></div>
<div>(jenkins_url)/restart &#8211; Forces a restart without waiting for builds to complete.</div>
<div></div>
<div><strong>Reference</strong></div>
<div><a href="https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API</a></div>
<div></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-remote-access-api-example/">Jenkins Remote access API Example | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-remote-access-api-example/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Environment variables and properties defined in jenkins &#124; Jenkins Tutorial</title>
		<link>https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/</link>
					<comments>https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 15 Jan 2017 03:02:25 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Environment variables]]></category>
		<category><![CDATA[Jenkins Set Environment Variables]]></category>
		<category><![CDATA[Jenkins Tutorial]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/01/15/environment-variables-and-properties-defined-in-jenkins/</guid>

					<description><![CDATA[<p>Environment variables and properties defined in jenkins Jenkins Set Environment Variables When a Jenkins job executes, it sets some environment [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/">Environment variables and properties defined in jenkins | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3018 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/environment-variables-and-p.png" alt="" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/environment-variables-and-p.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/environment-variables-and-p-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></h2>
<h2>Environment variables and properties defined in jenkins</h2>
<h3>Jenkins Set Environment Variables</h3>
<p>When a Jenkins job executes, it sets some environment variables that you may use in your shell script, batch command, Ant script or Maven POM <a href="https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-1">1</a>. The following table contains a list of all of these environment variables.</p>
<div>
<table>
<tbody>
<tr>
<th>Environment Variable</th>
<th>Description</th>
</tr>
<tr>
<td>BUILD_NUMBER</td>
<td>The current build number, such as &#8220;153&#8221;</td>
</tr>
<tr>
<td>BUILD_ID</td>
<td>The current build id, such as &#8220;2005-08-22_23-59-59&#8221; (YYYY-MM-DD_hh-mm-ss, <a href="https://issues.jenkins-ci.org/browse/JENKINS-26520" rel="nofollow">defunct</a> since version 1.597)</td>
</tr>
<tr>
<td>BUILD_URL</td>
<td>The URL where the results of this build can be found (e.g. http://buildserver/jenkins/job/MyJobName/666/)</td>
</tr>
<tr>
<td>NODE_NAME</td>
<td>The name of the node the current build is running on. Equals &#8216;master&#8217; for master node.</td>
</tr>
<tr>
<td>JOB_NAME</td>
<td>Name of the project of this build. This is the name you gave your job when you first set it up. It&#8217;s the third column of the Jenkins Dashboard main page.</td>
</tr>
<tr>
<td>BUILD_TAG</td>
<td>String of jenkins-${JOB_NAME}-${BUILD_NUMBER}. Convenient to put into a resource file, a jar file, etc for easier identification.</td>
</tr>
<tr>
<td>JENKINS_URL</td>
<td>Set to the URL of the Jenkins master that&#8217;s running the build. This value is used by <a title="Jenkins CLI" href="https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI">Jenkins CLI</a> for example</td>
</tr>
<tr>
<td>EXECUTOR_NUMBER</td>
<td>The unique number that identifies the current executor (among executors of the same machine) that&#8217;s carrying out this build. This is the number you see in the &#8220;build executor status&#8221;, except that the number starts from 0, not 1.</td>
</tr>
<tr>
<td>JAVA_HOME</td>
<td>If your job is configured to use a specific JDK, this variable is set to the JAVA_HOME of the specified JDK. When this variable is set, PATH is also updated to have $JAVA_HOME/bin.</td>
</tr>
<tr>
<td>WORKSPACE</td>
<td>The absolute path of the workspace.</td>
</tr>
<tr>
<td>SVN_REVISION</td>
<td>For Subversion-based projects, this variable contains the revision number of the module. If you have more than one module specified, this won&#8217;t be set.</td>
</tr>
<tr>
<td>CVS_BRANCH</td>
<td>For CVS-based projects, this variable contains the branch of the module. If CVS is configured to check out the trunk, this environment variable will not be set.</td>
</tr>
<tr>
<td>GIT_COMMIT</td>
<td>For Git-based projects, this variable contains the Git hash of the commit checked out for the build (like ce9a3c1404e8c91be604088670e93434c4253f03) (all the GIT_* variables require git plugin)</td>
</tr>
<tr>
<td>GIT_URL</td>
<td>For Git-based projects, this variable contains the Git url (like git@github.com:user/repo.git or [https://github.com/user/repo.git])</td>
</tr>
<tr>
<td>GIT_BRANCH</td>
<td>For Git-based projects, this variable contains the Git branch that was checked out for the build (normally origin/master)</td>
</tr>
</tbody>
</table>
</div>
<h2>Promoted Build Plugin Environment Variables</h2>
<p>If you are using the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin" rel="nofollow">Promoted Build Plugin</a>, you will have access to the following environment variables. This allows you to access information about your Jenkins build since certain environment variables stated above (such as BUILD_TAG now refer to the Promoted Build Plugin&#8217;s job.</p>
<div>
<table>
<tbody>
<tr>
<th>Environment Variable</th>
<th>Replaces</th>
<th>Description</th>
</tr>
<tr>
<td>PROMOTED_URL</td>
<td>BUILD_URL</td>
<td>The URL of the <strong>original</strong> Jenkins job that is involved with the promotion. BUILD_URL now refers to the Promotion&#8217;s URL</td>
</tr>
<tr>
<td>PROMOTED_JOB_NAME</td>
<td>JOB_NAME</td>
<td>The name of the <strong>original</strong> Jenkins job that is involved with the promotion. JOB_NAME now refers to the Promotion&#8217;s job&#8217;s name</td>
</tr>
<tr>
<td>PROMOTED_NUMBER</td>
<td>BUILD_NUMBER</td>
<td>The Build Number of the job being promoted. BUILD_NUMBER now refer&#8217;s the the Promotion Number</td>
</tr>
<tr>
<td>PROMOTED_ID</td>
<td>BUILD_ID</td>
<td>The Build ID (ex. &#8220;2005-08-22_23-59-59&#8221; (YYYY-MM-DD_hh-mm-ss) ) of the <strong>original</strong> Jenkins job. BUILD_ID now refer&#8217;s to the Promotion&#8217;s build ID.</td>
</tr>
</tbody>
</table>
</div>
<h1>System Properties</h1>
<table>
<tbody>
<tr>
<th><a href="http://54.154.154.23:8080/systemInfo">Name  ↓</a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Value   </a></th>
</tr>
<tr>
<td>awt.toolkit</td>
<td>sun.awt.X11.XToolkit</td>
</tr>
<tr>
<td>com.sun.akuma.Daemon</td>
<td>daemonized</td>
</tr>
<tr>
<td>executable-war</td>
<td>/usr/lib/jenkins/jenkins.war</td>
</tr>
<tr>
<td>file.encoding</td>
<td>UTF-8</td>
</tr>
<tr>
<td>file.encoding.pkg</td>
<td>sun.io</td>
</tr>
<tr>
<td>file.separator</td>
<td>/</td>
</tr>
<tr>
<td>java.awt.graphicsenv</td>
<td>sun.awt.X11GraphicsEnvironment</td>
</tr>
<tr>
<td>java.awt.headless</td>
<td>true</td>
</tr>
<tr>
<td>java.awt.printerjob</td>
<td>sun.print.PSPrinterJob</td>
</tr>
<tr>
<td>java.class.path</td>
<td>/usr/lib/jenkins/jenkins.war</td>
</tr>
<tr>
<td>java.class.version</td>
<td>52.0</td>
</tr>
<tr>
<td>java.endorsed.dirs</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/endorsed</td>
</tr>
<tr>
<td>java.ext.dirs</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/ext:/usr/java/packages/lib/ext</td>
</tr>
<tr>
<td>java.home</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre</td>
</tr>
<tr>
<td>java.io.tmpdir</td>
<td>/tmp</td>
</tr>
<tr>
<td>java.library.path</td>
<td>/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib</td>
</tr>
<tr>
<td>java.runtime.name</td>
<td>OpenJDK Runtime Environment</td>
</tr>
<tr>
<td>java.runtime.version</td>
<td>1.8.0_111-b15</td>
</tr>
<tr>
<td>java.specification.name</td>
<td>Java Platform API Specification</td>
</tr>
<tr>
<td>java.specification.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.specification.version</td>
<td>1.8</td>
</tr>
<tr>
<td>java.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.vendor.url</td>
<td>http://java.oracle.com/</td>
</tr>
<tr>
<td>java.vendor.url.bug</td>
<td>http://bugreport.sun.com/bugreport/</td>
</tr>
<tr>
<td>java.version</td>
<td>1.8.0_111</td>
</tr>
<tr>
<td>java.vm.info</td>
<td>mixed mode</td>
</tr>
<tr>
<td>java.vm.name</td>
<td>OpenJDK 64-Bit Server VM</td>
</tr>
<tr>
<td>java.vm.specification.name</td>
<td>Java Virtual Machine Specification</td>
</tr>
<tr>
<td>java.vm.specification.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.vm.specification.version</td>
<td>1.8</td>
</tr>
<tr>
<td>java.vm.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.vm.version</td>
<td>25.111-b15</td>
</tr>
<tr>
<td>JENKINS_HOME</td>
<td>/var/lib/jenkins</td>
</tr>
<tr>
<td>jna.loaded</td>
<td>true</td>
</tr>
<tr>
<td>jna.platform.library.path</td>
<td>/usr/lib64:/lib64:/usr/lib:/lib:/usr/lib64/mysql</td>
</tr>
<tr>
<td>jnidispatch.path</td>
<td>/tmp/jna&#8211;1712433994/jna4147775405825940943.tmp</td>
</tr>
<tr>
<td>line.separator</td>
<td></td>
</tr>
<tr>
<td>mail.smtp.sendpartial</td>
<td>true</td>
</tr>
<tr>
<td>mail.smtps.sendpartial</td>
<td>true</td>
</tr>
<tr>
<td>os.arch</td>
<td>amd64</td>
</tr>
<tr>
<td>os.name</td>
<td>Linux</td>
</tr>
<tr>
<td>os.version</td>
<td>3.10.0-514.el7.x86_64</td>
</tr>
<tr>
<td>path.separator</td>
<td>:</td>
</tr>
<tr>
<td>sun.arch.data.model</td>
<td>64</td>
</tr>
<tr>
<td>sun.boot.class.path</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/classes</td>
</tr>
<tr>
<td>sun.boot.library.path</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/amd64</td>
</tr>
<tr>
<td>sun.cpu.endian</td>
<td>little</td>
</tr>
<tr>
<td>sun.cpu.isalist</td>
<td></td>
</tr>
<tr>
<td>sun.font.fontmanager</td>
<td>sun.awt.X11FontManager</td>
</tr>
<tr>
<td>sun.io.unicode.encoding</td>
<td>UnicodeLittle</td>
</tr>
<tr>
<td>sun.java.command</td>
<td>/usr/lib/jenkins/jenkins.war &#8211;logfile=/var/log/jenkins/jenkins.log &#8211;webroot=/var/cache/jenkins/war &#8211;daemon &#8211;httpPort=8080 &#8211;debug=5 &#8211;handlerCountMax=100 &#8211;handlerCountMaxIdle=20</td>
</tr>
<tr>
<td>sun.java.launcher</td>
<td>SUN_STANDARD</td>
</tr>
<tr>
<td>sun.jnu.encoding</td>
<td>UTF-8</td>
</tr>
<tr>
<td>sun.management.compiler</td>
<td>HotSpot 64-Bit Tiered Compilers</td>
</tr>
<tr>
<td>sun.os.patch.level</td>
<td>unknown</td>
</tr>
<tr>
<td>svnkit.http.methods</td>
<td>Digest,Basic,NTLM,Negotiate</td>
</tr>
<tr>
<td>svnkit.ssh2.persistent</td>
<td>false</td>
</tr>
<tr>
<td>user.country</td>
<td>US</td>
</tr>
<tr>
<td>user.dir</td>
<td>/</td>
</tr>
<tr>
<td>user.home</td>
<td>/var/lib/jenkins</td>
</tr>
<tr>
<td>user.language</td>
<td>en</td>
</tr>
<tr>
<td>user.name</td>
<td>jenkins</td>
</tr>
<tr>
<td>user.timezone</td>
<td>America/New_York</td>
</tr>
</tbody>
</table>
<h1>Environment Variables</h1>
<table>
<tbody>
<tr>
<th><a href="http://54.154.154.23:8080/systemInfo">Name  ↓</a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Value   </a></th>
</tr>
<tr>
<td>_</td>
<td>/etc/alternatives/java</td>
</tr>
<tr>
<td>HOME</td>
<td>/var/lib/jenkins</td>
</tr>
<tr>
<td>LANG</td>
<td>en_US.UTF-8</td>
</tr>
<tr>
<td>LOGNAME</td>
<td>jenkins</td>
</tr>
<tr>
<td>NLSPATH</td>
<td>/usr/dt/lib/nls/msg/%L/%N.cat</td>
</tr>
<tr>
<td>PATH</td>
<td>/sbin:/usr/sbin:/bin:/usr/bin</td>
</tr>
<tr>
<td>PWD</td>
<td>/</td>
</tr>
<tr>
<td>SHELL</td>
<td>/bin/bash</td>
</tr>
<tr>
<td>SHLVL</td>
<td>2</td>
</tr>
<tr>
<td>USER</td>
<td>jenkins</td>
</tr>
<tr>
<td>XFILESEARCHPATH</td>
<td>/usr/dt/app-defaults/%L/Dt</td>
</tr>
</tbody>
</table>
<h1>Plugins</h1>
<table>
<tbody>
<tr>
<th><a href="http://54.154.154.23:8080/systemInfo">Name  ↓</a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Version   </a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Enabled   </a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Pinned   </a></th>
</tr>
<tr>
<td>ace-editor</td>
<td>1.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ant</td>
<td>1.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>antisamy-markup-formatter</td>
<td>1.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>bouncycastle-api</td>
<td>2.16.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>branch-api</td>
<td>1.11.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>build-timeout</td>
<td>1.18</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>cloudbees-folder</td>
<td>5.16</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>credentials</td>
<td>2.1.10</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>credentials-binding</td>
<td>1.10</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>display-url-api</td>
<td>0.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>durable-task</td>
<td>1.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>email-ext</td>
<td>2.53</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>external-monitor-job</td>
<td>1.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>git</td>
<td>3.0.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>git-client</td>
<td>2.2.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>git-server</td>
<td>1.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github</td>
<td>1.25.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github-api</td>
<td>1.84</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github-branch-source</td>
<td>1.10.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github-organization-folder</td>
<td>1.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>gradle</td>
<td>1.25</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>handlebars</td>
<td>1.1.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>icon-shim</td>
<td>2.0.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jacoco</td>
<td>2.1.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>javadoc</td>
<td>1.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jira</td>
<td>2.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jobConfigHistory</td>
<td>2.15</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jquery</td>
<td>1.11.2-0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jquery-detached</td>
<td>1.2.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>junit</td>
<td>1.19</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ldap</td>
<td>1.13</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>mailer</td>
<td>1.18</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>mapdb-api</td>
<td>1.0.9.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>matrix-auth</td>
<td>1.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>matrix-project</td>
<td>1.8</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>maven-plugin</td>
<td>2.14</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>momentjs</td>
<td>1.1.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pam-auth</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-build-step</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-graph-analysis</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-input-step</td>
<td>2.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-milestone-step</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-rest-api</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-stage-step</td>
<td>2.2</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-stage-view</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>plain-credentials</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>resource-disposer</td>
<td>0.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>scm-api</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>script-security</td>
<td>1.25</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>sonar</td>
<td>2.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ssh-credentials</td>
<td>1.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ssh-slaves</td>
<td>1.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>structs</td>
<td>1.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>subversion</td>
<td>2.7.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>thinBackup</td>
<td>1.9</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>timestamper</td>
<td>1.8.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>token-macro</td>
<td>2.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>windows-slaves</td>
<td>1.2</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-aggregator</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-api</td>
<td>2.8</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-basic-steps</td>
<td>2.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-cps</td>
<td>2.23</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-cps-global-lib</td>
<td>2.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-durable-task-step</td>
<td>2.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-job</td>
<td>2.9</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-multibranch</td>
<td>2.9.2</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-scm-step</td>
<td>2.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-step-api</td>
<td>2.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-support</td>
<td>2.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ws-cleanup</td>
<td>0.32</td>
<td>true</td>
<td>false</td>
</tr>
</tbody>
</table>
<p><strong>Useful Plugins</strong></p>
<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin</a></p>
<p><strong>Reference</strong></p>
<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project</a><br />
<a href="http://jenkins:8080/systemInfo" target="_blank" rel="noopener">http://jenkins:8080/systemInfo</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/">Environment variables and properties defined in jenkins | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Complete guide to use Jenkins CLI / Command line &#124; Jenkins Tutorials</title>
		<link>https://www.scmgalaxy.com/tutorials/complete-guide-to-use-jenkins-cli-command-line/</link>
					<comments>https://www.scmgalaxy.com/tutorials/complete-guide-to-use-jenkins-cli-command-line/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 08 Jan 2017 08:37:19 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[CLI / Command line]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Jenkins CLI / Command line]]></category>
		<category><![CDATA[Jenkins Command line]]></category>
		<category><![CDATA[Jenkins Command line Guide]]></category>
		<category><![CDATA[Jenkins Command line Tutorials]]></category>
		<category><![CDATA[Jenkins Tutorials]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/01/08/complete-guide-to-use-jenkins-cli-command-line/</guid>

					<description><![CDATA[<p>Complete guide to use Jenkins CLI / Command line? Run Jenkins build from command is very simple in Linux system. [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-guide-to-use-jenkins-cli-command-line/">Complete guide to use Jenkins CLI / Command line | Jenkins Tutorials</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img loading="lazy" decoding="async" class="size-full wp-image-2959 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/complete-guide-to-use-jenki.png" alt="jenkins-cli-command-line" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/complete-guide-to-use-jenki.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/complete-guide-to-use-jenki-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></div>
<div>Complete guide to use Jenkins CLI / Command line?</div>
<div></div>
<div>Run Jenkins build from command is very simple in Linux system. If you are using using windows, gitbash is a recommended which has bash shell in built. You can use windows command line as well. Jenkins has support to command line client that allows you to access Jenkins from command line.</div>
<div></div>
<div><strong>To Trigger Jenkins build from command line some prerequisite are there</strong></div>
<div></div>
<div>Jenkins service is running.</div>
<div>Enable security option under “Configure Global Security”</div>
<div></div>
<div>Go to jenkins dashboard in Home page ( e.g http://localhost:8080/ ) -&gt; Manage Jenkins</div>
<div>-&gt; Configure Global Security -&gt; Click on “Enable security” checkbox</div>
<div></div>
<div>
<p>You can also configure “Access Control” and “Authorization” option in Global Security page.</p>
<div><strong>Download Jenkins-cli.jar</strong></div>
<div>Download Jenkins-cli.jar from http://&lt;your_jenkins_server_url&gt;/jnlpJars/jenkins-cli.jar. (Here &lt;your_jenkins_server_url&gt; is your respective Jenkins server URL (development or staging))</div>
<div>Go to http://&lt;your_jenkins_server_url&gt;/cli and build your command by following the instructions there.</div>
</div>
<div></div>
<div><strong>How to login to Jenkins using commands</strong></div>
<div>If your Jenkins requires authentication, use &#8211;username and &#8211;password or &#8211;password-file options to specify the credentials. To avoid doing this for every command, you can also use the login CLI command once (with the same credentials parameters), and after that you may use other commands without specifying credentials.</div>
<div></div>
<div>Whenever the CLI tries to to connect to the Jenkins server, it offers the before mentioned SSH keys. When the user has those keys but don&#8217;t want use them to authenticate, preventing being prompted by the key&#8217;s password, it&#8217;s possible to use the -noKeyAuth argument. This way the CLI will never try to use the SSH keys available. failure to authenticate by itself does not constitute a fatal error. It will instead try to execute the command anyway, as the anonymous user.</div>
<div></div>
<div></div>
<div><strong>Login Jenkins using username and Password</strong></div>
<div>Jenkins allow us to trigger Jenkins build with any specific user, For that we have to pass username and password in command line.</div>
<div>$ java -jar &#8220;/tmp/kitchen/cache/jenkins-cli.jar&#8221; -s http://localhost:8080 who-am-i &#8211;username jenkins &#8211;password foobar</div>
<div>$ java -jar jenkins-cli.jar -s http://myjenkins help &#8211;username me &#8211;password mypassword</div>
<div></div>
<div><strong>Login Jenkins using public keys</strong></div>
<div>Starting 1.419 (which will be out July 4th), Jenkins CLI supports authentication based on the SSH key pair. Just like CloudBees DEV@cloud (or GitHub, or other similar sites), you interactively login from the web UI, then associate your public keys with your user account. Then CLI will silently authenticates itself using your ~/.ssh/id_rsa, ~/.ssh/id_dsa, or ~/.ssh/identity.</div>
<div>https://help.github.com/articles/generating-an-ssh-key/</div>
<div></div>
<div><strong>Login Jenkins using private keys</strong></div>
<div>You can also pass the priate key as follows</div>
<div>To use the -i option the syntax is as follows:</div>
<div>$ java -jar jenkins-cli.jar -s http://myjenkins help -i ~/.ssh/id_rsa</div>
<div>$ java -jar jenkins-cli.jar [-s JENKINS_URL] [-i PRIVATE_KEY] command [options&#8230;] [arguments&#8230;]</div>
<div>For compatibility reasons, unless you use the -i option,</div>
<div></div>
<div><strong>Login Jenkins using initialAdminPassword</strong></div>
<div>try user &#8220;admin&#8221; and password from &#8220;Jenkins\secrets\initialAdminPassword&#8221;</div>
<div>java -jar jenkins-cli.jar -s http://localhost:8080 who-am-i &#8211;username admin &#8211;password fe3f1e1624ea4be8873b7a35e28b24be</div>
<div></div>
<div><strong>Login Jenkins using passphrase</strong></div>
<div>Go to http://jenkins-serer:8085/user/admin/configure and set the passphrase in &#8220;SSH Public Keys&#8221; and use the same passphrase with jenkins commands.</div>
<div></div>
<div><strong>E.g 1 &#8211; Getting help</strong></div>
<div>The list of the available commands depends on the server you are talking to. Visit https://jenkins.example.com/cli or use &#8216;help&#8217; command to list them all:</div>
<div>&gt; java -jar jenkins-cli.jar -s https://jenkins.example.com help [command]</div>
<div></div>
<div><strong>E.g 2 &#8211; Run Jenkins Build From Command Line</strong></div>
<div>&gt; java -jar jenkins-cli.jar -s http://&lt;jenkins server&gt;/ build build-name [-c] [-f] [-p] [-r N] [-s] [-v] [-w]</div>
<div></div>
<div>build-name : Name of the job to build</div>
<div>-c  : Check for SCM changes before starting the build, and if there&#8217;s no change, exit without doing a build</div>
<div>-f  : Follow the build progress. Like -s only interrupts are not passed through to the build.</div>
<div>-p  : Specify the build parameters in the key=value format.</div>
<div>-s  : Wait until the completion/abortion of the command. Interrupts are passed through to the build.</div>
<div>-v  : Prints out the console output of the build. Use with -s</div>
<div>-w  : Wait until the start of the command</div>
<div></div>
<div>Example  &#8211; java -jar jenkins-cli.jar -s http://localhost:8080/ build &#8216;my-project-build&#8217; &#8211;username roop &#8211;password roop</div>
<div></div>
<div><strong>E.g 3 &#8211; List all jobs under the view: tools</strong></div>
<div>$ java -jar jenkins-cli.jar -s http://jenkins/ list-jobs tools</div>
<div></div>
<div><strong>E.g 4 &#8211; Get the configuration of the job: template</strong></div>
<div>$ java -jar jenkins-cli.jar -s http://jenkins/ get-job template &gt; template.xml</div>
<div></div>
<div><strong>E.g 5 &#8211; Create a new job based on the configuration</strong></div>
<div>$ java -jar jenkins-cli.jar -s http://jenkins/ create-job new_job_name &lt; new_job_name.xml</div>
<div></div>
<div><strong>E.g 6 &#8211; Run groovy script</strong></div>
<div>$ java -jar jenkins-cli.jar -s http://jenkins/ groovy scripts/add_job_to_view.groovy</div>
<div>If there are any parameters in the script, just as:</div>
<div>import jenkins.model.*</div>
<div></div>
<div>if (args.length != 2 ) {</div>
<div>  println &#8220;Error on arguments!&#8221;</div>
<div>}</div>
<div>def jobName  = args[0] ?: &#8216;a_job&#8217;</div>
<div>def viewName = args[1] ?: &#8216;a_view&#8217;</div>
<div></div>
<div>println jobName + &#8216; &#8216; + viewName</div>
<div></div>
<div>def v = Jenkins.instance.getView(viewName)</div>
<div>def i = Jenkins.instance.getItemByFullName(jobName)</div>
<div>if (v &amp;&amp; i) {</div>
<div>  v.add(i)</div>
<div>}</div>
<div></div>
<div>pass the parameters as:</div>
<div></div>
<div>$ java -jar jenkins-cli.jar -s http://jenkins/ groovy scripts/add_job_to_view.groovy JOB_NAME VIEM_NAME</div>
<div></div>
<div><strong>E.g 7 &#8211; Build a job</strong></div>
<div>$ java -jar jenkins-cli.jar -s http://jenkins/ build new_job_name</div>
<div></div>
<div><strong>E.g 8 &#8211; Diable a job</strong></div>
<div>$ java -jar jenkins-cli.jar -s http://jenkins/ disable-job new_job_name</div>
<div></div>
<div><strong>E.g 8 &#8211; Passing parameters when triggering a job build</strong></div>
<div>Job parameters are a very handy concept. Perhaps you&#8217;ve only ever used Jenkins or another CI system to automatically run builds when a remote SCM/git repo changes. You can also trigger builds manually from within Jenkins. And whilst you&#8217;re doing that, your job can prompt for parameters to the build.</div>
<div></div>
<div>For example, we have a job named similar to &#8220;Deploy XYZ App&#8221;. It has the git repo hardcoded in the job like a normal build, but when you press &#8220;Build&#8221;, it shows a list of options: string fields, drop-down lists, etc.</div>
<div></div>
<div>When the job runs, you can use these values anywhere within your job&#8217;s configuration. Its very cool.</div>
<div></div>
<div>But how to pass those same parameters via the CLI? You use the -p key=value flag for each parameter you want to pass.</div>
<div></div>
<div>So our finished product might look like:</div>
<div>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;Deploy XYZ App&#8217; -i ~/.ssh/id_rsa -s -v -p target_env=api.cloudfoundry.com -p branch=master</div>
<div></div>
<div><strong>Commons problems</strong></div>
<div>Operation timed out</div>
<div>$ java -jar jenkins-cli.jar -s YOUR_SERVER_URL help</div>
<div>Exception in thread &#8220;main&#8221; java.net.ConnectException: Operation timed out</div>
<div>at java.net.PlainSocketImpl.socketConnect(Native Method)</div>
<div>at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)</div>
<div>at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)</div>
<div>at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)</div>
<div>at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)</div>
<div>at java.net.Socket.connect(Socket.java:529)</div>
<div>at java.net.Socket.connect(Socket.java:478)</div>
<div>at java.net.Socket.&lt;init&gt;(Socket.java:375)</div>
<div>at java.net.Socket.&lt;init&gt;(Socket.java:189)</div>
<div>at hudson.cli.CLI.&lt;init&gt;(CLI.java:97)</div>
<div>at hudson.cli.CLI.&lt;init&gt;(CLI.java:82)</div>
<div>at hudson.cli.CLI._main(CLI.java:250)</div>
<div>at hudson.cli.CLI.main(CLI.java:199)</div>
<div>Check that the JNLP port is opened if you are using a firewall on your server. You can configure its value in Jenkins configuration. By default it is set to use a random port.</div>
<div></div>
<div>java.io.IOException: No X-Jenkins-CLI2-Port</div>
<div>java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, null, Server, X-Content-Type-Options, Connection, X-You-Are-In-Group, X-Hudson, X-Permission-Implied-By, Date, X-Jenkins-Session, X-You-Are-Authenticated-As, X-Required-Permission, Set-Cookie, Expires, Content-Length, Content-Type]</div>
<div>at hudson.cli.CLI.getCliTcpPort(CLI.java:284)</div>
<div>at hudson.cli.CLI.&lt;init&gt;(CLI.java:128)</div>
<div>at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)</div>
<div>at hudson.cli.CLI._main(CLI.java:473)</div>
<div>at hudson.cli.CLI.main(CLI.java:384)</div>
<div>Suppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: <a href="http://citest.gce.px/cli" target="_blank" rel="noopener">http://citest.gce.px/cli</a></div>
<div>at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)</div>
<div>at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)</div>
<div>at hudson.cli.FullDuplexHttpStream.&lt;init&gt;(FullDuplexHttpStream.java:78)</div>
<div>at hudson.cli.CLI.connectViaHttp(CLI.java:152)</div>
<div>at hudson.cli.CLI.&lt;init&gt;(CLI.java:132)</div>
<div>&#8230; 3 more</div>
<div>Solution: Go to Manage Jenkins -&gt; Configure Global Security -&gt; &#8220;TCP port for JNLP agents&#8221;: choose fixed or random</div>
<div></div>
<div><strong>Reference</strong></div>
<div><a href="https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI</a></div>
<div><a href="http://lifuzu.com/blog/2014/04/24/playing-with-jenkins-create-job/" target="_blank" rel="noopener">http://lifuzu.com/blog/2014/04/24/playing-with-jenkins-create-job/</a></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-guide-to-use-jenkins-cli-command-line/">Complete guide to use Jenkins CLI / Command line | Jenkins Tutorials</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/complete-guide-to-use-jenkins-cli-command-line/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Trigger builds remotely in Jenkins? &#124; Jenkins Tutorials &#124; scmGalaxy</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sat, 07 Jan 2017 06:57:01 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Builds]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[Jenkins Tutorial]]></category>
		<category><![CDATA[Remotely]]></category>
		<category><![CDATA[Trigger]]></category>
		<category><![CDATA[Trigger builds]]></category>
		<category><![CDATA[Trigger builds remotely in Jenkins]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/01/07/how-to-trigger-builds-remotely-in-jenkins/</guid>

					<description><![CDATA[<p>How to Trigger builds remotely in Jenkins? 1. Create a user &#8211; You need to create a user in jenkins [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/">How to Trigger builds remotely in Jenkins? | Jenkins Tutorials | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img loading="lazy" decoding="async" class="size-full wp-image-2956 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-trigger-builds-remot.png" alt="trigger-builds-remotely-in-jenkins" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-trigger-builds-remot.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-trigger-builds-remot-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></div>
<div><strong>How to Trigger builds remotely in Jenkins?</strong></div>
<div></div>
<div><strong>1. Create a user &#8211; You need to create a user in jenkins using you would like to trigger a jenkins jobs from remote loction or script</strong></div>
<div></div>
<div>How to create users in Jenkins?</div>
<div>Manage Jenkins &#8211;&gt; Manage Users &#8211;&gt; Create User</div>
<div></div>
<div><strong>2. Assign a right privillage to the specific user?</strong></div>
<div>How to assign privillage to the user?</div>
<div>Manage Jenkins &#8211;&gt; Configure Global Security &#8211;&gt; Enabled &#8220;Anyone can do anything&#8221;</div>
<div>OR</div>
<div>Manage Jenkins &#8211;&gt; Configure Global Security &#8211;&gt; Configure &#8220;Matrix-based security&#8221; for the specific users and assign atleast following Permissions.</div>
<div></div>
<div>Overall &#8211; Read</div>
<div>Job &#8211; Build</div>
<div>Job &#8211; Read</div>
<div>Job &#8211; Workspace</div>
<div></div>
<div><strong>3. Find out jenkins user &#8220;API Token&#8221;</strong></div>
<div>How to find jenkins user &#8220;API Token&#8221;?</div>
<div>&#8220;</div>
<div>Click on the user name located at top right(e.g http://54.171.140.1:8080/user/admin1/) &#8211;&gt; Configure &#8211;&gt; Locate the &#8220;API Token&#8221; section.</div>
<div></div>
<div><strong>4. Enabled &#8220;Trigger builds remotely&#8221; in Jenkins Job Configuration.</strong></div>
<div>Click on the desired job &#8211;&gt; Configure &#8211;&gt; Locate the &#8220;Trigger builds remotely&#8221; under &#8220;Build Triggers&#8221; Tab</div>
<div>Enabled the check box of &#8220;Trigger builds remotely&#8221;</div>
<div>Provide some Authentication Token e.g &#8211; iFBDOBhNhaxL4T9ass93HRXun2JF161Z</div>
<div>$ Save</div>
<div></div>
<div><strong>5. Formulate the command to run using curl. </strong></div>
<div>&gt; curl &#8211;user userid:API-Token http://IP OR HOST:PORT/job/JOB_NAME/build?token=Authentication_Token</div>
<div>eg.curl &#8211;user admin1:91367cf0389eaf89669f74c9963c9fb3 http://54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</div>
<div></div>
<div><strong>Some of other formats which is being tried in google but need to be tested with specific users. there are working with &#8220;Anonymous&#8221;</strong></div>
<div>&gt; curl -X POST http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</div>
<div></div>
<div>
<p>&gt; wget <a href="http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z">http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</a></p>
<p>WORKING WITH NEW JENKINS<br />
&gt; wget &#8211;auth-no-challenge &#8211;user=admin &#8211;password=5ad344f0518640f62d0483084bb889bc http://13.126.143.49:8080/job/ANT//build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</p>
</div>
<p><strong>If you are using wget 1.11 against Jenkins version 1.586 and above with the JENKINS-25169 fix, you might need to use the following options:</strong><br />
wget &#8211;auth-no-challenge &#8211;http-user=user &#8211;http-password=apiToken &#8211;secure-protocol=TLSv1 http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN</p>
<p><strong>If you are using wget 1.11, you might need to use the following options:</strong><br />
wget &#8211;auth-no-challenge &#8211;http-user=user &#8211;http-password=apiToken http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN</p>
<p><strong>With wget 1.10.x the following is enough (but will not work with 1.11.x) :</strong><br />
wget http://user:apiToken@jenkins.yourcompany.com/job/your_job/build?token=TOKEN</p>
<div>
<div><strong>If you are a Windows User!</strong></div>
<div></div>
<div>‘gitbash’ is a program combined of git and bash. A bash is shell that runs commands once you type the name of command and press enter. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></div>
<div></div>
<div>Download  the git bash from here <a href="https://git-scm.com/download/win" target="_blank" rel="noopener">https://git-scm.com/download/win</a> and install it.</div>
<div></div>
</div>
<div></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/">How to Trigger builds remotely in Jenkins? | Jenkins Tutorials | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Generate Jenkins Job Configuration Automatically &#124; Jenkins Tutorials</title>
		<link>https://www.scmgalaxy.com/tutorials/generate-jenkins-job-configuration-automatically/</link>
					<comments>https://www.scmgalaxy.com/tutorials/generate-jenkins-job-configuration-automatically/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 17 Aug 2016 16:41:11 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Automatically]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Generate]]></category>
		<category><![CDATA[Jenkins Job Builder]]></category>
		<category><![CDATA[Jenkins Job Configuration]]></category>
		<category><![CDATA[Jenkins Tutorials]]></category>
		<category><![CDATA[Job Generator]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2016/08/17/generate-jenkins-job-configuration-automatically/</guid>

					<description><![CDATA[<p>Generate Jenkins Job Configuration Automatically? Job DSL Plugin The job-dsl-plugin allows the programmatic creation of projects using a DSL. Pushing [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/generate-jenkins-job-configuration-automatically/">Generate Jenkins Job Configuration Automatically | Jenkins Tutorials</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2944 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/08/generate-jenkins-job-config.png" alt="generate-jenkins-job-configuration-automatically" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/08/generate-jenkins-job-config.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/08/generate-jenkins-job-config-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></div>
<div></div>
<div><strong>Generate Jenkins Job Configuration Automatically?</strong></div>
<div></div>
<div><strong>Job DSL Plugin</strong></div>
<div>The job-dsl-plugin allows the programmatic creation of projects using a DSL. Pushing job creation into a script allows you to automate and standardize your Jenkins installation, unlike anything possible before.</div>
<div>More &#8211;</div>
<div><a href="https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin</a></div>
<div><a href="https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial---Using-the-Jenkins-Job-DSL" target="_blank" rel="noopener">https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial&#8212;Using-the-Jenkins-Job-DSL</a></div>
<div></div>
<div><strong>Multi-Branch Project Plugin</strong></div>
<div>This plugin adds additional project types that create sub-projects for each branch using a shared configuration.</div>
<div>More &#8211; <a href="https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin</a></div>
<div></div>
<div><strong>Job Generator Plugin</strong></div>
<div>This plugin adds a new job type &#8220;Job Generator&#8221; which can generate new projects when executed.</div>
<div>More &#8211; <a href="https://wiki.jenkins-ci.org/display/JENKINS/Job+Generator+Plugin" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Job+Generator+Plugin</a></div>
<div></div>
<div><strong>Jenkins Job Builder</strong></div>
<div>Jenkins Job Builder takes simple descriptions of Jenkins jobs in YAML or JSON format and uses them to configure Jenkins. You can keep your job descriptions in human readable text format in a version control system to make changes and auditing easier. It also has a flexible template system, so creating many similarly configured jobs is easy.</div>
<div></div>
<div>More &#8211;</div>
<div><a href="http://docs.openstack.org/infra/jenkins-job-builder/" target="_blank" rel="noopener">http://docs.openstack.org/infra/jenkins-job-builder/</a></div>
<div><a href="https://www.slalom.com/thinking/automatically-generating-jenkins-jobs" target="_blank" rel="noopener">https://www.slalom.com/thinking/automatically-generating-jenkins-jobs</a></div>
<div></div>
<div><strong>Generating New Jenkins Jobs From Templates and Parameterised Builds</strong></div>
<div>We use Jenkins to run our builds in a continuously. This is great, but you still have to do a fair bit of configuration each time you set up a new job. If you have a fairly static set of builds this isn’t a problem. We found ourselves in a situation where we had to create a lot of very similar builds quite regularly. Creating a new job by hand and manually changing the 10 or so tiny little things in each build is a pain and error prone. So…automate that too!</div>
<div></div>
<div>More</div>
<div><a href="http://www.blackpepper.co.uk/generating-new-jenkins-jobs-from-templates-and-parameterised-builds/" target="_blank" rel="noopener">http://www.blackpepper.co.uk/generating-new-jenkins-jobs-from-templates-and-parameterised-builds/</a></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/generate-jenkins-job-configuration-automatically/">Generate Jenkins Job Configuration Automatically | Jenkins Tutorials</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/generate-jenkins-job-configuration-automatically/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Jenkins using Docker &#124; Step by step guide &#124; scmGalaxy</title>
		<link>https://www.scmgalaxy.com/tutorials/install-jenkins-using-docker/</link>
					<comments>https://www.scmgalaxy.com/tutorials/install-jenkins-using-docker/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 10 Mar 2016 11:17:46 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to Install Jenkins using Docker]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[Install Jenkins using Docker]]></category>
		<category><![CDATA[Jenkins Installation Guide]]></category>
		<category><![CDATA[Jenkins installation process]]></category>
		<category><![CDATA[Jenkins installation tutorial]]></category>
		<category><![CDATA[Jenkins Installation using Docker]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2016/03/10/install-jenkins-using-docker/</guid>

					<description><![CDATA[<p>Step 1: Installing Docker $ apt-get install docker (Ubuntu) $ yum install docker  (RHEL/CENTOS) For more info, please following this [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/install-jenkins-using-docker/">How to Install Jenkins using Docker | Step by step guide | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3058 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/03/install-jenkins-using-docke.png" alt="" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/03/install-jenkins-using-docke.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2016/03/install-jenkins-using-docke-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></div>
<div><strong>Step 1: Installing Docker</strong></div>
<div>
<pre class="brush: plain; title: ; notranslate">
$ apt-get install docker (Ubuntu)
$ yum install docker  (RHEL/CENTOS)
</pre>
</div>
<div>For more info, please following this <a href="http://www.scmgalaxy.com/scm/software-containers/how-to-install-docker-in-linux.html" target="_blank" rel="noopener">http://www.scmgalaxy.com/scm/software-containers/how-to-install-docker-in-linux.html</a></div>
<div></div>
<div><strong>Step 2:  First, pull the official jenkins image from Docker repository.</strong></div>
<div>
<pre class="brush: plain; title: ; notranslate">$ docker pull jenkins </pre>
</div>
<div></div>
<div>
<p><strong>Step 3: Next, run a container using this image and map data directory from the container to the host; e.g in the example below /var/jenkins_home from the container is mapped to jenkins/ directory from the current path on the host. Jenkins 8080 port is also exposed to the host as 49001.</strong></p>
<p><strong>Mapping port 8080 on the host to the container (the web ui), port 50000 to port 50000 (for build agents). Run with `-p 50000:50000` so you can connect JNLP slaves. For port 50000. This is to handle connections from JNLP based build slaves. This will store the workspace in /var/jenkins_home. All Jenkins data lives in there including plugins and configuration.</strong></p>
</div>
<div>
<div>
<pre class="brush: plain; title: ; notranslate">$ docker run -d -p 8080:8080 -p 50000:50000 jenkins </pre>
</div>
<div></div>
<div><strong>This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user &#8211; uid 1000) or use -u some_other_user parameter with docker run.</strong></div>
<div>
<pre class="brush: plain; title: ; notranslate">$ docker run -d -p 8080:8080 -p 50000:50000 -u root -v $PWD/jenkins:/var/jenkins_home jenkins </pre>
</div>
<div></div>
<div> <strong>Other Example:</strong></div>
<div>
<pre class="brush: plain; title: ; notranslate">docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins -u root </pre>
</div>
<div></div>
<div><strong>This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user &#8211; uid 1000) or use -u some_other_user parameter with docker run. </strong><strong>This information is also found in the Dockerfile. So all you need to do is to ensure that the directory $PWD/jenkins is own by UID 1000:</strong></div>
<div>
<pre class="brush: plain; title: ; notranslate">
$ mkdir jenkins
$ chown 1000 jenkins
$ docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins
</pre>
<div><strong>How to see the Jenkins log?</strong></div>
<div>
<pre class="brush: plain; title: ; notranslate">$ docker exec name tail -f /var/log/jenkins/jenkins.log
Where name = --name </pre>
</div>
</div>
<div><strong>Step 3:  Access to j=Jenkins</strong></div>
<div>As we have successfully run Jenkins Container, we can browse Jenkins Web Interface using our Web Browser by pointint to http://ip-address:49001 or http://localhost:49001 according to the configuration.</div>
</div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/install-jenkins-using-docker/">How to Install Jenkins using Docker | Step by step guide | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/install-jenkins-using-docker/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jenkins useful websites references &#124; Jenkins Resources &#124; scmGalaxy</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-useful-websites-reference/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-useful-websites-reference/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 12 Nov 2015 15:25:59 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Jenkins Installation]]></category>
		<category><![CDATA[Jenkins Installation Guide]]></category>
		<category><![CDATA[Jenkins installation process]]></category>
		<category><![CDATA[Jenkins Resources]]></category>
		<category><![CDATA[Jenkins useful references]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Useful]]></category>
		<category><![CDATA[Websites]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/11/12/jenkins-useful-websites-reference/</guid>

					<description><![CDATA[<p>How to take care of a large Jenkins installation and still keep your sanity &#8211; Part 1 How to take [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-useful-websites-reference/">Jenkins useful websites references | Jenkins Resources | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><a href="http://www.technology-ebay.de/the-teams/mobile-de/blog/taming-the-hydra-part-1.html"><img loading="lazy" decoding="async" class="size-full wp-image-3095 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/11/jenkins-useful-websites-ref.png" alt="jenkins-useful-websites-reference" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/11/jenkins-useful-websites-ref.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/11/jenkins-useful-websites-ref-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></div>
<div></div>
<div><a href="http://www.technology-ebay.de/the-teams/mobile-de/blog/taming-the-hydra-part-1.html">How to take care of a large Jenkins installation and still keep your sanity &#8211; Part 1</a></div>
<div><a href="http://www.technology-ebay.de/the-teams/mobile-de/blog/taming-the-hydra-part-2.html">How to take care of a large Jenkins installation and still keep your sanity &#8211; Part 2</a></div>
<div><a href="http://www.technology-ebay.de/the-teams/mobile-de/blog/taming-the-hydra-part-3.html">How to take care of a large Jenkins installation and still keep your sanity &#8211; Part 3</a></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-useful-websites-reference/">Jenkins useful websites references | Jenkins Resources | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-useful-websites-reference/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to attach the jenkins build log as part of the email body?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body-2/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body-2/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sat, 03 Oct 2015 12:26:05 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Attach]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Email body]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to attach jenkins build log]]></category>
		<category><![CDATA[Jenkins build log]]></category>
		<category><![CDATA[Jenkins build log in email body]]></category>
		<category><![CDATA[Log]]></category>
		<category><![CDATA[Part]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Ways]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/10/03/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body-2/</guid>

					<description><![CDATA[<p>Way 1 &#8211;  Put following lines as part of Default Content text box ${BUILD_LOG, maxLines=9999, escapeHtml=false} this works for free [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body-2/">How to attach the jenkins build log as part of the email body?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3333 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/jenkins-build-log-as-part-o-1.png" alt="jenkins-build-log-as-part-of-the-email-body" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/jenkins-build-log-as-part-o-1.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/10/jenkins-build-log-as-part-o-1-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><strong>Way 1 &#8211; </strong></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">Put following lines as part of Default Content text box</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_LOG, maxLines=9999, escapeHtml=false}</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">this works for free style projects</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><strong>Way 2 &#8211; If you want send only specific line using regex</strong></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_LOG_REGEX, regex=&#8221;\\b(Buildfile|BUILD)\\<wbr />b&#8221;, linesAfter=1}</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_LOG_REGEX, regex=&#8221;^.*?BUILD FAILED.*?$&#8221;, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_LOG_REGEX, regex=&#8221;\\b(FC0)\\b&#8221;, linesAfter=1}</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_LOG_REGEX, regex=&#8221;^.*?BUILD FAILED.*?$&#8221;, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_LOG_REGEX, regex=&#8221;^.*?FC0.*?$&#8221;, maxMatches=95, showTruncatedLines=false, escapeHtml=false, matchedLineHtmlStyle=true}</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">This will show exactly which is expected lines as part of the regEx.</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><strong>List of other variables as part of email body</strong></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${PROJECT_URL}/ws/</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_URL}/artifact/</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">${BUILD_LOG, maxLines=1000}</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">More ref</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">Content Token Reference</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">In string arguments, escape &#8220;, \, and line terminators (\n or \r\n) with a \, e.g. arg1=&#8221;\&#8221;quoted\&#8221;&#8221;; arg2=&#8221;c:\\path&#8221;; and arg3=&#8221;one\ntwo&#8221;. The brackets may be omitted if there are no arguments.</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;">New Lines &#8211; Use &lt;br&gt; or &#8220;\&#8221;</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><strong>More Info </strong></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><a style="color: #1155cc;" href="http://wiki.hudson-ci.org/display/HUDSON/Email-ext+plugin" target="_blank" rel="noopener">http://wiki.hudson-ci.org/<wbr />display/HUDSON/Email-ext+<wbr />plugin</a></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><a style="color: #1155cc;" href="http://stackoverflow.com/questions/9439450/how-will-i-filter-out-only-errors-in-jenkins-email-ext-build-log-regex" target="_blank" rel="noopener">http://stackoverflow.com/<wbr />questions/9439450/how-will-i-<wbr />filter-out-only-errors-in-<wbr />jenkins-email-ext-build-log-<wbr />regex</a></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><a style="color: #1155cc;" href="http://champasoft.blogspot.nl/2012/11/jenkins-pattern-for-e-mailing-log.html" target="_blank" rel="noopener">http://champasoft.blogspot.nl/<wbr />2012/11/jenkins-pattern-for-e-<wbr />mailing-log.html</a></div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;"><a style="color: #1155cc;" href="https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/<wbr />display/JENKINS/Email-ext+<wbr />plugin</a></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body-2/">How to attach the jenkins build log as part of the email body?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jenkins Backup and Restore Process &#124; Jenkins Tutorial</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-backup-and-restore-process/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-backup-and-restore-process/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 20 Sep 2015 10:34:04 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to Backup Jenkins]]></category>
		<category><![CDATA[How to Restore Jenkins]]></category>
		<category><![CDATA[Jenkins Backup]]></category>
		<category><![CDATA[Jenkins Backup Process]]></category>
		<category><![CDATA[Jenkins Backup Tutorial]]></category>
		<category><![CDATA[Jenkins Process]]></category>
		<category><![CDATA[Jenkins Restore]]></category>
		<category><![CDATA[Jenkins Restore Tutorial]]></category>
		<category><![CDATA[Jenkins Tutorial]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Restore]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/09/20/jenkins-backup-and-restore-process/</guid>

					<description><![CDATA[<p>How Do I Backup Jenkins Jobs using Grunt? Backup Jenkins configuration to S3 bash-backup-script for jenkins‘ job-configs via user-crontab Backup [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-backup-and-restore-process/">Jenkins Backup and Restore Process | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3353 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-backup-and-restore-.png" alt="jenkins-backup-and-restore-process" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-backup-and-restore-.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-backup-and-restore--300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></h3>
<h3><a href="https://www.sghill.net/how-do-i-backup-jenkins-jobs.html" target="_blank" rel="noopener">How Do I Backup Jenkins Jobs using Grunt?</a></h3>
<h3><a href="http://www.clausconrad.com/blog/backup-jenkins-configuration-to-s3" target="_blank" rel="noopener">Backup Jenkins configuration to S3</a></h3>
<h3><a href="http://christoph-burmeister.eu/?p=1981" target="_blank" rel="noopener">bash-backup-script for jenkins‘ job-configs via user-crontab</a></h3>
<h3><a href="http://softwaretester.info/backup-and-restore-jenkins/" target="_blank" rel="noopener">Backup and restore Jenkins using jenkins plugins</a></h3>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-backup-and-restore-process/">Jenkins Backup and Restore Process | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-backup-and-restore-process/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to attach the jenkins build log as part of the email body?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 11 Sep 2015 16:29:12 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Attach]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Email body]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to attach jenkins build log]]></category>
		<category><![CDATA[Jenkins build log]]></category>
		<category><![CDATA[Jenkins build log in email body]]></category>
		<category><![CDATA[Log]]></category>
		<category><![CDATA[Part]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Ways]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/09/11/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body/</guid>

					<description><![CDATA[<p>Way 1 &#8211;  Put following lines as part of Default Content text box ${BUILD_LOG, maxLines=9999, escapeHtml=false} this works for free [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body/">How to attach the jenkins build log as part of the email body?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3363 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-build-log-as-part-o.png" alt="jenkins-build-log-as-part-of-the-email-body" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-build-log-as-part-o.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-build-log-as-part-o-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p><strong>Way 1 &#8211; </strong></p>
<p>Put following lines as part of Default Content text box</p>
<p>${BUILD_LOG, maxLines=9999, escapeHtml=false}</p>
<p>this works for free style projects</p>
<p><strong>Way 2 &#8211; If you want send only specific line using regex</strong></p>
<p>${BUILD_LOG_REGEX, regex=&#8221;\\b(Buildfile|BUILD)\\b&#8221;, linesAfter=1}</p>
<p>${BUILD_LOG_REGEX, regex=&#8221;^.*?BUILD FAILED.*?$&#8221;, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}</p>
<p>${BUILD_LOG_REGEX, regex=&#8221;\\b(FC0)\\b&#8221;, linesAfter=1}</p>
<p>${BUILD_LOG_REGEX, regex=&#8221;^.*?BUILD FAILED.*?$&#8221;, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}</p>
<p>${BUILD_LOG_REGEX, regex=&#8221;^.*?FC0.*?$&#8221;, maxMatches=95, showTruncatedLines=false, escapeHtml=false, matchedLineHtmlStyle=true}</p>
<p>This will show exactly which is expected lines as part of the regEx.</p>
<p>More Info</p>
<p><a href="http://wiki.hudson-ci.org/display/HUDSON/Email-ext+plugin" target="_blank" rel="noopener">http://wiki.hudson-ci.org/display/HUDSON/Email-ext+plugin</a></p>
<p><a href="http://stackoverflow.com/questions/9439450/how-will-i-filter-out-only-errors-in-jenkins-email-ext-build-log-regex" target="_blank" rel="noopener">http://stackoverflow.com/questions/9439450/how-will-i-filter-out-only-errors-in-jenkins-email-ext-build-log-regex</a></p>
<p><a href="http://champasoft.blogspot.nl/2012/11/jenkins-pattern-for-e-mailing-log.html" target="_blank" rel="noopener">http://champasoft.blogspot.nl/2012/11/jenkins-pattern-for-e-mailing-log.html</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body/">How to attach the jenkins build log as part of the email body?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-attach-the-jenkins-build-log-as-part-of-the-email-body/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Resolve jenkins java.lang.outofmemoryerror permgen space issues?</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 03 Sep 2015 06:32:06 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[java.lang.OutOfMemoryError: PermGen space]]></category>
		<category><![CDATA[Jenkins Error]]></category>
		<category><![CDATA[Jenkins Issue]]></category>
		<category><![CDATA[jenkins java.lang.OutOfMemoryError: PermGen space]]></category>
		<category><![CDATA[jenkins space issue]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Resolve]]></category>
		<category><![CDATA[Solution]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/09/03/jenkins-java-lang-outofmemoryerror-permgen-space-issues/</guid>

					<description><![CDATA[<p>Solution 1 In Windows: Go to environment variable and add following variables export JAVA_OPTS=&#8221;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221; export GRADLE_OPTS=&#8221;-XX:MaxPermSize=512m&#8221; export SONAR_RUNNER_OPTS=&#8221;-Xmx512m [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/">How to Resolve jenkins java.lang.outofmemoryerror permgen space issues?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3367 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-java-lang-outofmemo.png" alt="jenkins-java-lang-outofmemoryerror-permgen-space-issues" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-java-lang-outofmemo.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-java-lang-outofmemo-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p><strong>Solution 1</strong></p>
<p>In Windows: Go to environment variable and add following variables</p>
<p>export JAVA_OPTS=&#8221;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221;<br />
export GRADLE_OPTS=&#8221;-XX:MaxPermSize=512m&#8221;<br />
export SONAR_RUNNER_OPTS=&#8221;-Xmx512m -XX:MaxPermSize=512m&#8221;</p>
<p>In Linux:<br />
In my ~/.bash_profile file, I have set the following 3 variables. Note there are other variables in this file as well i.e. JAVA_HOME, ANT_HOME, SONAR_HOME, SONAR_RUNNER_HOME, etc:</p>
<p>export JAVA_OPTS=&#8221;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221;<br />
export GRADLE_OPTS=&#8221;-XX:MaxPermSize=512m&#8221;<br />
export SONAR_RUNNER_OPTS=&#8221;-Xmx512m -XX:MaxPermSize=512m&#8221;</p>
<p><strong>Solution 2</strong><br />
You can set the -Xmx or -XX:MaxPermSize in your Jenkins global configuration. To do this, navigate to Jenkins global configuration page (Manage Jenkins -&gt; Configure System)</p>
<p>Name &#8211; JAVA_OPTS<br />
Value &#8211; &#8220;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221;</p>
<p>You can set similarlity for maven, gradle, sonar as well under &#8220;Maven Project Configuration&#8221; or grade project configuration.</p>
<p>Name &#8211; GRADLE_OPTS<br />
Value &#8211; &#8220;-XX:MaxPermSize=512m&#8221;</p>
<p><strong>Solution 3</strong></p>
<p>They way you can modify this value depends on the distribution and depending on the slave type</p>
<p>Master</p>
<p>In RedHat, for example, you can do it under /etc/sysconfig/jenkins using the variable JENKINS_JAVA_OPTIONS&#8230; i.e JENKINS_JAVA_OPTIONS=&#8221;-XX:MaxPermSize=512m&#8221;.<br />
In Ubuntu, the Jenkins configuration file is under /etc/default/jenkins and the variable to configure is JAVA_ARGS &#8230; i.e JAVA_ARGS=&#8221;-XX:MaxPermSize=512m&#8221;.</p>
<p>Slave</p>
<p>Sometimes slave machines will require permgen to be increased. Depending on the type of slave that is configured will require a different method for setting any java argument.</p>
<p>With SSH Slaves, the java process is started using an SSH command, so the &#8220;-XX:MaxPermSize=512m&#8221; can be set in the JVM Options in the Node configuration page.<br />
With JNLP Slaves launching as a service on linux, you can add the VM arguments to the startup scripts (usually in /etc/sysconfig/jenkins or /etc/default/jenkins as part of the JAVA_ARGS variable)<br />
With JNLP Slaves launching as a service on Windows requires modifications to be made on the jenkins.xml file which is located on slave machine in the JENKINS_HOME directory.</p>
<p><strong>Reference</strong><br />
<a href="http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space" target="_blank" rel="noopener">http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space</a><br />
<a href="https://wiki.jenkins-ci.org/display/JENKINS/Builds+failing+with+OutOfMemoryErrors" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Builds+failing+with+OutOfMemoryErrors</a><br />
<a href="https://cloudbees.zendesk.com/hc/en-us/articles/204264000-Why-do-I-receive-java-lang-OutOfMemoryError-PermGen-space" target="_blank" rel="noopener">https://cloudbees.zendesk.com/hc/en-us/articles/204264000-Why-do-I-receive-java-lang-OutOfMemoryError-PermGen-space</a><br />
<a href="http://stackoverflow.com/questions/14762162/how-do-i-give-jenkins-more-heap-space-when-its-running-as-a-daemon-on-ubuntu" target="_blank" rel="noopener">http://stackoverflow.com/questions/14762162/how-do-i-give-jenkins-more-heap-space-when-its-running-as-a-daemon-on-ubuntu</a><br />
<a href="http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space" target="_blank" rel="noopener">http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space</a><br />
<a href="http://javarevisited.blogspot.nl/2011/09/javalangoutofmemoryerror-permgen-space.html" target="_blank" rel="noopener">http://javarevisited.blogspot.nl/2011/09/javalangoutofmemoryerror-permgen-space.html</a><br />
<a href="https://plumbr.eu/outofmemoryerror/permgen-space" target="_blank" rel="noopener">https://plumbr.eu/outofmemoryerror/permgen-space</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/">How to Resolve jenkins java.lang.outofmemoryerror permgen space issues?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jenkins Troubleshooting Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-troubleshooting/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-troubleshooting/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 02 Sep 2015 15:32:25 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Jenkins Error]]></category>
		<category><![CDATA[Jenkins Error Solutions]]></category>
		<category><![CDATA[Jenkins Issues]]></category>
		<category><![CDATA[Jenkins Issues Solutions]]></category>
		<category><![CDATA[Jenkins Problems]]></category>
		<category><![CDATA[Jenkins Problems Solutions]]></category>
		<category><![CDATA[Jenkins Troubleshooting]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Troubleshooting Jenkins]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/09/02/jenkins-troubleshooting/</guid>

					<description><![CDATA[<p>Jenkins Troubleshooting Jenkins is one of the important CI tools which many organization used as part of their Build and [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-troubleshooting/">Jenkins Troubleshooting Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3369 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-troubleshooting.png" alt="jenkins-troubleshooting" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-troubleshooting.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-troubleshooting-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p><strong>Jenkins Troubleshooting</strong></p>
<p>Jenkins is one of the important CI tools which many organization used as part of their Build and DevOps infrasture. I am going to consolidate all the troubshooting techniques which can be used in order to find any issues related in jenkins.</p>
<p><strong>Step 1.</strong> Take a look at Log generated by the jenkins and plugins via <a href="http://jenkins-master/log">http://jenkins-master/log</a></p>
<p>Note: Here you can also create your own logger and and set your custom log levels such as (severe, warning, info, config, file, finer, finest, all)</p>
<p><strong>Step 2</strong>. Also, you can look at /var/log/jenkins/jenkins.log via doing &#8220;tail -f /var/log/jenkins/jenkins.log&#8221; and check carefully whats breaking it.</p>
<p>Log file in windows &#8211; jenkins.err.log &amp; jenkins.out.log</p>
<p>Slave log file in windows &#8211; logs\slaves</p>
<p><strong>Step 3.</strong> Check the system log file</p>
<p>Step 4. Few Jenkins plugins which can you help you<br />
<a href="https://wiki.jenkins-ci.org/display/JENKINS/Monitoring">https://wiki.jenkins-ci.org/display/JENKINS/Monitoring</a></p>
<p><strong>Step 4.</strong> Make sure your Jenkins &amp; installed plugins version is installed with most uptodate stable release.</p>
<p><strong>Some Common issues:</strong><br />
Issues 1. If Jenkins hangs, follow <a href="http://jenkins-master/log">https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+is+hanging</a></p>
<p>Issues 2 Site is down with no 404 messages<br />
Cause- Jenkins had an Out of Memory (OOM) error causing the server to kill the jenkins instance<br />
Solution: Restart server; Review heap logs to identify root cause of error</p>
<p>Issues 3 Site is up however no jobs are displayed<br />
Cause 1: AWS Server rebooted but data volume did not mount properly<br />
Solution: mount &lt;device&gt; &lt;path&gt; on the instance</p>
<p>Issues 4 &#8211; java.lang.outofmemoryerror permgen space issues</p>
<p>Solution &#8211; <a href="scm/build-workflow-management/jenkins/jenkins-java-lang-outofmemoryerror-permgen-space-issues.html">http://www.scmgalaxy.com/scm/build-workflow-management/jenkins/jenkins-java-lang-outofmemoryerror-permgen-space-issues.html</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-troubleshooting/">Jenkins Troubleshooting Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-troubleshooting/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jenkins Command line Reference for login and trigger a job</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 05 Feb 2015 00:00:00 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to login in Jenkins]]></category>
		<category><![CDATA[How to trigger a job in Jenkins]]></category>
		<category><![CDATA[Jenkins Command line]]></category>
		<category><![CDATA[Jenkins Command line Guide]]></category>
		<category><![CDATA[Jenkins Command line Reference]]></category>
		<category><![CDATA[Jenkins Command line Tutorial]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Login Jenkins]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Trigger]]></category>
		<category><![CDATA[Ways]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/02/05/jenkins-command-line-reference-for-login-and-trigger-a-job/</guid>

					<description><![CDATA[<p>Grep will return 0 while the build is running: $ curl http://myjenkins/job/myjob/lastBuild/api/json &#124; grep &#8211;color result\&#8221;:null $ echo $? Trigger [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/">Jenkins Command line Reference for login and trigger a job</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3535 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere.png" alt="jenkins-command-line-reference" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p><b>Grep will return 0 while the build is running:</b></p>
<p>$ curl http://myjenkins/job/myjob/lastBuild/api/json | grep &#8211;color result\&#8221;:null</p>
<p>$ echo $?</p>
<p><strong>Trigger a Jenkins Job from command line</strong></p>
<p>$ wget http://yourserver/job/MyJobname/build?delay=0sec</p>
<p>$ wget -O &#8211; $HUDSON_URL/job/JOBNAME/build</p>
<p><strong>Trigger a Jenkins Job without authentication</strong></p>
<p>$ curl http://jenkins:8080/job/my%20job/build</p>
<p><strong>Trigger a Jenkins Job with authentication</strong></p>
<p>$ curl &#8211;user dbacher:$MY_API_TOKEN http://jenkins:8080/job/my%20job/build</p>
<p>$ curl &#8211;user &lt;your_jenkins_username&gt;:&lt;your_jenkins_API_key&gt; http://&lt;jenkins_server_url&gt;/job/&lt;your_jenkins_job_name&gt;/build</p>
<p><strong>Running commands against a secure Jenkins (basic auth or ssh keys)</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins help &#8211;username me &#8211;password mypassword</p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins help -i ~/.ssh/id_rsa</p>
<p><strong>Triggering a job build against a secure Jenkins (avoiding a 1.5 year old open bug!)</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;My Awesome Jenkins Job&#8217; -i ~/.ssh/id_rsa</p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;My Awesome Jenkins Job&#8217; -i ~/.ssh/id_rsa -s -v</p>
<p><strong>Passing parameters when triggering a job build</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;Deploy XYZ App&#8217; -i ~/.ssh/id_rsa -s -v -p target_env=api.cloudfoundry.com -p branch=master</p>
<p><strong>Reference</strong></p>
<p><a href="http://starkandwayne.com/articles/2013/04/12/jenkins-builds-from-cli/" target="_blank" rel="noopener">http://starkandwayne.com/articles/2013/04/12/jenkins-builds-from-cli/</a></p>
<p><a href="http://www.scmgalaxy.com/index.php?option=com_k2&amp;view=item&amp;id=890:ways-to-login-jenkins-using-command-line&amp;Itemid=120" target="_blank" rel="noopener">http://www.scmgalaxy.com/index.php?option=com_k2&amp;view=item&amp;id=890:ways-to-login-jenkins-using-command-line&amp;Itemid=120</a></p>
<p><strong>Appendix</strong></p>
<p>1. How to get your_jenkins_API_key?</p>
<ul>
<li>Login to your Jenkins.</li>
<li>Click on the username in the top right.</li>
<li>Click on Configure.</li>
<li>Click on ‘Show API Token’ button.</li>
<li>You got it.</li>
</ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/">Jenkins Command line Reference for login and trigger a job</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
