<?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>Trigger builds remotely in Jenkins Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/trigger-builds-remotely-in-jenkins/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/trigger-builds-remotely-in-jenkins/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:49:38 +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>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 fetchpriority="high" 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="(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>
	</channel>
</rss>
