<?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>Push Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/push/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/push/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:54:17 +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>What is Enable signed push support in Gerrit?</title>
		<link>https://www.scmgalaxy.com/tutorials/what-is-enable-signed-push-support-in-gerrit/</link>
					<comments>https://www.scmgalaxy.com/tutorials/what-is-enable-signed-push-support-in-gerrit/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 19 Aug 2018 19:43:14 +0000</pubDate>
				<category><![CDATA[Gerrit]]></category>
		<category><![CDATA[enable]]></category>
		<category><![CDATA[enable signed push]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[signed]]></category>
		<category><![CDATA[Support]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5164</guid>

					<description><![CDATA[<p>This options Defaults to false. This ensure When a client pushes with git push &#8211;signed, this ensures that the push [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-is-enable-signed-push-support-in-gerrit/">What is Enable signed push support in Gerrit?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This options Defaults to false.</p>
<p>This ensure When a client pushes with git push &#8211;signed, this ensures that the push certificate is valid and signed with a valid public key stored in the refs/meta/gpg-keys branch of All-Users.</p>
<p>If true, server-side signed push validation is enabled.</p>
<p>Config in gerrit.config &#8211; receive.enableSignedPush</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-is-enable-signed-push-support-in-gerrit/">What is Enable signed push support in Gerrit?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/what-is-enable-signed-push-support-in-gerrit/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to build when a change is pushed to Bitbucket</title>
		<link>https://www.scmgalaxy.com/tutorials/build-when-a-change-is-pushed-to-bitbucket/</link>
					<comments>https://www.scmgalaxy.com/tutorials/build-when-a-change-is-pushed-to-bitbucket/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 01 Aug 2017 18:10:46 +0000</pubDate>
				<category><![CDATA[Source Code Management]]></category>
		<category><![CDATA[Bitbucket]]></category>
		<category><![CDATA[Bitbucket Tutorial]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/08/01/build-when-a-change-is-pushed-to-bitbucket/</guid>

					<description><![CDATA[<p>&#160; Bitbucket plugin is designed to offer integration between Bitbucket and Jenkins. &#160; It exposes a single URI endpoint that [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/build-when-a-change-is-pushed-to-bitbucket/">How to build when a change is pushed to Bitbucket</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-2716 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/08/bitbucket-tutorials.png" alt="bitbucket-tutorials" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/08/bitbucket-tutorials.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/08/bitbucket-tutorials-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<div></div>
<p>&nbsp;</p>
<div>Bitbucket plugin is designed to offer integration between Bitbucket and Jenkins.</div>
<div></div>
<p>&nbsp;</p>
<div>It exposes a single URI endpoint that you can add as a WebHook within each Bitbucket project you wish to integrate with. This single endpoint receives a full data payload from Bitbucket upon push (see their documentation), triggering compatible jobs to build based on changed repository/branch.</div>
<div></div>
<p>&nbsp;</p>
<div><strong>Step 1 &#8211;</strong> Install &#8220;Bitbucket Plugin&#8221; at your Jenkins</div>
<div></div>
<p>&nbsp;</p>
<div><strong>Step 2 &#8211;</strong> Add a normal Post as Hook to your Bitbucket repository (Settings -&gt; Hooks) and use following url:</div>
<p>&nbsp;</p>
<div>https://YOUR.JENKINS.SERVER:PORT/bitbucket-hook/</div>
<div>and if you have setup authentication on jenkins then URL must be like</div>
<div></div>
<p>&nbsp;</p>
<div>https://USERNAME:PASSWORD@YOUR.JENKINS.SERVER:PORT/bitbucket-hook/</div>
<div></div>
<p>&nbsp;</p>
<div><strong>Step 3 &#8211;</strong> Configure your Jenkins project as follows:</div>
<div></div>
<p>&nbsp;</p>
<div><strong>Step 4 &#8211;</strong> Under build trigger enable Build when a change is pushed to BitBucket</div>
<div></div>
<p>&nbsp;</p>
<div><strong>Step 5 &#8211;</strong> under Source Code Management select GIT; enter your credentials and define Branches to build (like **feature/*)</div>
<div></div>
<p>&nbsp;</p>
<div><strong>Note 1 &#8211;</strong> Make sure to include the slash (&#8216;/&#8217;) on the end of the URL or the hook won&#8217;t work.</div>
<p>&nbsp;</p>
<div></div>
<div><strong>Note 2 &#8211;</strong> Please read the BitBucket Plugin info page as well <a href="https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin" target="_blank" rel="noopener">https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin</a></div>
<div></div>
<p>&nbsp;</p>
<div><strong>Reference 1  </strong></div>
<div><a href="https://confluence.atlassian.com/bamboo/repository-triggers-the-build-when-changes-are-committed-289276902.html" target="_blank" rel="noopener">https://confluence.atlassian.com/bamboo/repository-triggers-the-build-when-changes-are-committed-289276902.html</a></div>
<div></div>
<div><strong>Reference 2 &#8211; Login issues with Jenkins url</strong></div>
<div><a href="https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins">https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins</a></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/build-when-a-change-is-pushed-to-bitbucket/">How to build when a change is pushed to Bitbucket</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/build-when-a-change-is-pushed-to-bitbucket/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to build when a change is pushed to GitHub in Jenkins?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-build-when-a-change-is-pushed-to-github-in-jenkins/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-build-when-a-change-is-pushed-to-github-in-jenkins/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 15 Jan 2017 02:30:34 +0000</pubDate>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Change]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[GitHub Plugin]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[Jenkins Guide]]></category>
		<category><![CDATA[Jenkins Tutorials]]></category>
		<category><![CDATA[Push]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/01/15/how-to-build-when-a-change-is-pushed-to-github-in-jenkins/</guid>

					<description><![CDATA[<p>The GitHub plugin for Jenkins is the most basic plugin for integrating Jenkins with GitHub projects. If you are a [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-build-when-a-change-is-pushed-to-github-in-jenkins/">How to build when a change is pushed to GitHub in Jenkins?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img decoding="async" class="alignnone size-full wp-image-2963 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-build-when-a-change-.png" alt="build-when-a-change-is-pushed-to-github-in-jenkins" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-build-when-a-change-.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-build-when-a-change--300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<div>The GitHub plugin for Jenkins is the most basic plugin for integrating Jenkins with GitHub projects. If you are a GitHub user, this plugin enables you to:</div>
<div></div>
<ul>
<li>Schedule your build</li>
<li>Pull your code and data files from your GitHub repository to your Jenkins machine</li>
<li>Automatically trigger each build on the Jenkins server, after each Commit on your Git repository</li>
</ul>
<div></div>
<div>
<p>This saves you time and lets you incorporate your project into the Continuous Integration (CI) process.</p>
<div><strong>How to Start Working with the GitHub Plugin for Jenkins</strong></div>
<div></div>
<div><strong>Install the Github Jenkins plugin</strong></div>
<div>Go to &#8220;Manage Jenkins&#8221; &#8211;&gt; &#8220;Manage Plugins&#8221; &#8211;&gt; &#8220;Available&#8221; Tab &#8211;&gt; Search for &#8220;GitHub plugin&#8221; and install it.</div>
<div></div>
<div></div>
<div><strong>Configure the plugin with github accounts and keys</strong></div>
<div>Go to &#8220;Manage Jenkins&#8221; &#8211;&gt; &#8220;Configure System&#8221; &#8211;&gt; Locate &#8220;Github&#8221; section and &#8220;Add Github Server&#8221;.</div>
<div><a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks2.png"><img decoding="async" class="alignnone wp-image-496 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks2.png" alt="" width="1301" height="378" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks2.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks2-300x87.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks2-768x223.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks2-1024x298.png 1024w" sizes="(max-width: 1301px) 100vw, 1301px" /></a></div>
<div>
<p>API URL &#8211; If you server is github.com, your &#8220;API URL&#8221; would be &#8220;https://api.github.com&#8221; Otherwise if you use GitHub Enterprise, specify its API endpoint here (e.g., <a href="https://ghe.acme.com/api/v3/)">https://ghe.acme.com/api/v3/)</a>.</p>
</div>
<div></div>
<div>Credentials &#8211; You can create your own personal access token in your account GitHub settings.</div>
<div>Token should be registered with scopes: Refer https://github.com/settings/tokens/new.</div>
<div></div>
<div>Add credentials (your Github token), Apply and &#8220;Test Connection&#8221;.<br />
<a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks3.png"><img loading="lazy" decoding="async" class="alignnone wp-image-497 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks3.png" alt="" width="1301" height="369" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks3.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks3-300x85.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks3-768x218.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks3-1024x290.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /></a><br />
<a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks4.png"><img loading="lazy" decoding="async" class="alignnone wp-image-498 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks4.png" alt="" width="1040" height="772" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks4.png 1040w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks4-300x223.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks4-768x570.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks4-1024x760.png 1024w" sizes="auto, (max-width: 1040px) 100vw, 1040px" /></a></div>
<div></div>
<div></div>
<div><strong>Open your Jenkins Project</strong></div>
<div>
<p>a) Check the GitHub project checkbox and set the Project URL to point to your GitHub Repository</p>
<p><a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks5.png"><img loading="lazy" decoding="async" class="alignnone wp-image-499 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks5.png" alt="" width="1301" height="352" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks5.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks5-300x81.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks5-768x208.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks5-1024x277.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /></a></p>
</div>
<div></div>
<div>b) Under Source Code Management, check Git and set the Repository URL to point to your GitHub Repository<br />
<a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks6.png"><img loading="lazy" decoding="async" class="alignnone wp-image-500 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks6.png" alt="" width="1301" height="559" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks6.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks6-300x129.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks6-768x330.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks6-1024x440.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /></a></div>
<div></div>
<div>c) Under Build Triggers, check the “Build when a change is pushed to GitHub” checkbox<br />
<a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks7.png"><img loading="lazy" decoding="async" class="alignnone wp-image-501 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks7.png" alt="" width="1301" height="319" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks7.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks7-300x74.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks7-768x188.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks7-1024x251.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /></a></div>
<div></div>
<div></div>
<div><strong>4. Install the Jenkins (GitHub plugin) and set a webhook to your Jenkins machine</strong></div>
<div>a) From your GitHub repository, go to Settings and then to Integrations &amp; Services</div>
<div>b) Click on Add Service and add ‘Jenkins (GitHub plugin)’</div>
<div>
<p>c) Set the Jenkins hook URL as the URL for your Jenkins machine, and add /github-webhook/</p>
<p><a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks8.png"><img loading="lazy" decoding="async" class="alignnone wp-image-502 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks8.png" alt="" width="1301" height="707" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks8.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks8-300x163.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks8-768x417.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks8-1024x556.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /></a><br />
<a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks9.png"><img loading="lazy" decoding="async" class="alignnone wp-image-503 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks9.png" alt="" width="1301" height="553" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks9.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks9-300x128.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks9-768x326.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks9-1024x435.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /></a><br />
<a href="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks10.png"><img loading="lazy" decoding="async" class="alignnone wp-image-504 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks10.png" alt="" width="1301" height="844" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks10.png 1301w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks10-300x195.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks10-768x498.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/github-jenkins-integration-hooks10-1024x664.png 1024w" sizes="auto, (max-width: 1301px) 100vw, 1301px" /></a></p>
</div>
<div></div>
<div><strong>Congratulations! Every time you publish your changes to Github, GitHub will trigger your new Jenkins job.</strong></div>
<div></div>
<div></div>
<div><strong>Another Approach noted by suprakash</strong></div>
<div>Actually if you do the web hook settings from Jenkins -&gt; Github plugin configuration (mentioned above), you will still see webhooks get created in github. So , above two approaches basically doing the same thing.</div>
<div></div>
<div>I personally like it to create webhook from Github, because in this way you don&#8217;t have to share or store github user info in jenkins.</div>
<div></div>
<div>Steps : 1. Login into Github (with Admin) 2. Go to the repository you want to hook with jenkins 3. Click on settings tab -&gt; webhooks &amp; services 4. Click on Add Webhook 5. Enter payload url : like : http://:8080/github-webhook/ 6. Select content type as json 7. you are done</div>
<div></div>
<div>
<p>Now you do the changes and commit , you will see jenkins build get trigger automatically. Don&#8217;t forget to do the settings in jenkins jobs to start the build when push code in github.</p>
<p><strong>Reference</strong></p>
<div><a href="https://www.blazemeter.com/blog/how-start-working-github-plugin-jenkins" target="_blank" rel="noopener">https://www.blazemeter.com/blog/how-start-working-github-plugin-jenkins</a></div>
<div><a href="https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin</a></div>
<div><a href="http://stackoverflow.com/questions/30576881/jenkins-build-when-a-change-is-pushed-to-github-option-is-not-working" target="_blank" rel="noopener">http://stackoverflow.com/questions/30576881/jenkins-build-when-a-change-is-pushed-to-github-option-is-not-working</a></div>
</div>
</div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-build-when-a-change-is-pushed-to-github-in-jenkins/">How to build when a change is pushed to GitHub 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-build-when-a-change-is-pushed-to-github-in-jenkins/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Run/Deploy Java EE applications on Amazon EC2?</title>
		<link>https://www.scmgalaxy.com/tutorials/running-java-ee-applications-on-amazon-ec2/</link>
					<comments>https://www.scmgalaxy.com/tutorials/running-java-ee-applications-on-amazon-ec2/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 10 Mar 2010 06:01:03 +0000</pubDate>
				<category><![CDATA[Amazon (Elastic Cloud)]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Deploy]]></category>
		<category><![CDATA[Deploy Java EE app on Amazon Ec2]]></category>
		<category><![CDATA[ec2deploy]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[How to Deploe Java EE app on Ec2]]></category>
		<category><![CDATA[How to Run Java EE app on Ec2]]></category>
		<category><![CDATA[Instruction]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Java EE app on Ec2]]></category>
		<category><![CDATA[Java EE application on Amazon Ec2]]></category>
		<category><![CDATA[Push]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Run Java EE applications on Amazon EC2]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2010/03/10/running-java-ee-applications-on-amazon-ec2/</guid>

					<description><![CDATA[<p>Running Java EE applications on Amazon EC2: deploying to 20 machines with no money down Computer hardware has traditionally been [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/running-java-ee-applications-on-amazon-ec2/">How to Run/Deploy Java EE applications on Amazon EC2?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4109 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/03/java-ee-applications-on-ama.png" alt="running-java-ee-applications-on-amazon-ec2" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/03/java-ee-applications-on-ama.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/03/java-ee-applications-on-ama-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></h1>
<h1>Running Java EE applications on Amazon EC2: deploying to 20 machines with no money down</h1>
<p>Computer hardware has traditionally been a scarce, expensive resource. In the early days of computing developers had to share a single machine. Today each developer usually has their own machine but it’s rare for a developer to have more than one. This means that running performance tests often involves scavenging for machines.  Likewise, replicating even just part of a production environment is a major undertaking. With <a href="http://www.amazon.com/gp/browse.html?node=201590011" target="_blank" rel="noopener">Amazon’s Elastic Compute Cloud (EC2)</a>, however, things are very different. A set of Linux servers is now just a web service call away. Depending on the <a href="http://www.amazon.com/gp/browse.html?node=370375011" target="_blank" rel="noopener">type of the servers</a> you simply pay 10-80 cents per server per hour for up to 20 servers! No more upfront costs or waiting for machines to be purchased and configured.</p>
<p>To make it easier for enterprise Java developers to use EC2, I have created EC2Deploy.  It’s a Groovy framework for deploying an enterprise Java application on a set of Amazon EC2 servers. EC2Deploy provides a simple, easy to use API for launching a set of EC2 instances; configuring MySQL, Apache and one or more Tomcat servers; and deploying one or more web applications. In addition, it can also run JMeter and collect performance metrics.</p>
<p>Here is an example script that launches some EC2 instances; configures MySQL with one slave, Tomcat and Apache; deploys a single web application on the Tomcat server; and runs a JMeter test with first one thread and then two.</p>
<pre>class ClusterTest extends GroovyTestCase {</pre>
<pre>  void testSomething() {</pre>
<pre>    AWSProperties awsProperties = new</pre>
<pre>        AWSProperties("/…/aws.properties")</pre>
<pre></pre>
<pre>    def ec2 = new EC2(awsProperties)</pre>
<pre></pre>
<pre>    def explodedWar = '…/projecttrack/webapp/target/ptrack'</pre>
<pre></pre>
<pre>    ClusterSpec clusterSpec =</pre>
<pre>       new ClusterSpec()</pre>
<pre>            .schema("ptrack", ["ptrack": "ptrack"],</pre>
<pre>                    ["src/test/resources/testdml1.sql",</pre>
<pre>                     "src/test/resources/testdml2.sql"])</pre>
<pre>            .slaves(1)</pre>
<pre>            .tomcats(1)</pre>
<pre>            .webApp(explodedWar, "ptrack")</pre>
<pre>            .catalinaOptsBuilder({builder, databasePrivateDnsName -&gt;</pre>
<pre>                 builder.arg("-Xmx500m")</pre>
<pre>                 builder.prop("com.sun.management.jmxremote")</pre>
<pre>                 builder.prop("com.sun.management.jmxremote.port", 8091)</pre>
<pre>                 builder.prop("com.sun.management.jmxremote.authenticate",</pre>
<pre>                                     false)</pre>
<pre>                 builder.prop("com.sun.management.jmxremote.ssl", false)</pre>
<pre>                 builder.prop("ptrack.application.environment", "ec2")</pre>
<pre>                 builder.prop("log4j.configuration",</pre>
<pre>                               "log4j-minimal.properties")</pre>
<pre>                 builder.prop("jdbc.db.server", databasePrivateDnsName)})</pre>
<pre></pre>
<pre>    SimpleCluster cluster = new SimpleCluster(ec2, clusterSpec)</pre>
<pre></pre>
<pre>    cluster.loadTest("…/projecttrack/functionalTests/jmeter/SimpleTest.jmx",</pre>
<pre>        [1, 2])</pre>
<pre></pre>
<pre>    cluster.stop()</pre>
<pre>  }</pre>
<pre>}</pre>
<p>Let’s look at each of the pieces.</p>
<p>First, we need to configure the framework as follows:</p>
<pre>    AWSProperties awsProperties = new</pre>
<pre>        AWSProperties("/…/aws.properties")</pre>
<pre>    def ec2 = new EC2(awsProperties)</pre>
<p>The aws.properties file contains various properties including the Amazon WS security credentials and the EC2 AMI (i.e. OS image) to launch. All servers use my EC2 appliance AMI that has Java, MySQL, Apache, Tomcat, Jmeter and some other useful tools pre-installed.</p>
<p>Next we need to configure the servers:</p>
<pre>     ClusterSpec clusterSpec =</pre>
<pre>        new ClusterSpec()</pre>
<pre>             .schema("ptrack", ["ptrack": "ptrack"],</pre>
<pre>                    ["src/test/resources/testdml1.sql",</pre>
<pre>                     "src/test/resources/testdml2.sql"])</pre>
<pre>             .slaves(1)</pre>
<pre>             .tomcats(1)</pre>
<pre>             .webApp(explodedWar, "ptrack")</pre>
<pre>             .catalinaOptsBuilder({builder, databasePrivateDnsName -&gt;</pre>
<pre>                 builder.arg("-Xmx500m")</pre>
<pre>                 builder.prop("com.sun.management.jmxremote")</pre>
<pre>                 builder.prop("com.sun.management.jmxremote.port", 8091)</pre>
<pre>                 builder.prop("com.sun.management.jmxremote.authenticate",</pre>
<pre>                                     false)</pre>
<pre>                 builder.prop("com.sun.management.jmxremote.ssl", false)</pre>
<pre>                 builder.prop("ptrack.application.environment", "ec2")</pre>
<pre>                 builder.prop("log4j.configuration",</pre>
<pre>                               "log4j-minimal.properties")</pre>
<pre>                 builder.prop("jdbc.db.server", databasePrivateDnsName)})</pre>
<pre></pre>
<pre>     SimpleCluster cluster = new SimpleCluster(ec2, clusterSpec)</pre>
<p>This code first creates a ClusterSpec, which defines the configuration of the machines and the applications:</p>
<ul>
<li>schema() – specifies the name of the database schema to create; names of the users and their passwords; the DML scripts to execute once the database has been create</li>
<li>slaves() – specifies how many MySql slaves to create</li>
<li>tomcats() &#8211; specifies how many Tomcats to run.</li>
<li>webApp() &#8211; configures a web application. This method takes two parameters: the path to the exploded WAR directory (conveniently created by Maven) and the context to deploy the web application under.</li>
<li>catalinaOptsBuilder() – supplies a closure that takes a builder and the DNS name of the MySQL server as arguments and returns the CATALINA_OPTS used to launch Tomcat. It’s primary purpose is to configure the web application(s) to use the correct database server</li>
</ul>
<p>It then creates a cluster with that specification.</p>
<p>We then start the cluster:</p>
<pre>    cluster.start()</pre>
<p>At this point EC2Deploy will:</p>
<ol>
<li>Launch the EC2 instances running my appliance AMI.</li>
<li>Initialize the MySql master database</li>
<li>Create the MySql slave</li>
<li>Create the database schema and the users</li>
<li>Run any DML scripts (these are cached on S3 in a bucket called “tmp&#8211;dml” for the reasons described next)</li>
<li>Upload the web applications to <a href="http://www.amazon.com/gp/browse.html?node=16427261" target="_blank" rel="noopener">Amazon S3 (Simple Storage Service)</a> where they are cached in order to avoid time consuming uploads (over slow DSL connections, for example). EC2Deploy only uploads new and changed files, which means that the bulky 3<sup>rd</sup> party libraries are only uploaded once. Each web application is stored in an S3 bucket called -tmp-war. If this bucket does not exist you will see some warning messages and the bucket will be created.</li>
<li>Deploy the web applications on each of the Tomcat servers</li>
<li>Configure Apache to load balance across the Tomcat servers</li>
</ol>
<p>Once the cluster is started we can run a JMeter load test:</p>
<pre>    cluster.loadTest("…/projecttrack/functionalTests/jmeter/SimpleTest.jmx", [1, 2])</pre>
<p>The first argument specifies the test to run and the second argument is a list of JMeter thread counts. In this example, EC2deploy first runs the load test with one thread and then two threads. For each test run, it generates a report describing CPU utilization for each machine, average response time and throughput.</p>
<p>Finally, we stop the EC2 instances:</p>
<p>cluster.stop()</p>
<p>As you can see, EC2Deploy makes it pretty easy to deploy and test your enterprise Java application. I’ve used it to clone a production environment and run load tests. NOTE 1/28/08: The source code EC2Deploy along with a very cool Maven plugin is now <a href="http://www.chris-richardson.blog-city.com/ec2deploy_and_the_cloud_tools_maven_plugin_are_now_available.htm">available</a> !</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/running-java-ee-applications-on-amazon-ec2/">How to Run/Deploy Java EE applications on Amazon EC2?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/running-java-ee-applications-on-amazon-ec2/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
