<?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>grovvy Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/grovvy/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/grovvy/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:07:03 +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 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 fetchpriority="high" 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 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>
	</channel>
</rss>
