Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327898

Summary: Allow wget on git.eclipse.org
Product: Community Reporter: Markus Kuppe <bugs.eclipse.org>
Component: GitAssignee: Eclipse Webmaster <webmaster>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Markus Kuppe CLA 2010-10-15 10:47:17 EDT
Hi,

took keep server load minimal ECF intents to implement a post-receive git hook to trigger builds on the ECF build machine (located at OSU) after a successful push.
The easiest way to do this, is to send a GET request, e.g. https://build.ecf-project.org/hudson/job/$JOBNAME/build?token=TOKEN with wget. However wget just returns:

mkuppe@dev2:~> wget 
-committer_shell: /usr/bin/wget: Permission denied
Comment 1 Denis Roy CLA 2010-10-15 11:35:12 EDT
wget is disabled for security reasons, and we really don't want to be spawning processes on our mission-critical services. In fact, down, the road, git and dev.eclipse.org will not have the ability to initiate Internet conversations on our own.

From here, you have a few options:

1. Continue polling.  It's not ideal, but it is more secure for us that way.

2. Move your build process to our Hudson instance on hudson.eclipse.org.

3. Use the build server, build.eclipse.org, to trigger your build with wget.  It could poll git from behind our firewall, which at least won't use Internet bandwidth (yours or ours).
Comment 2 Markus Kuppe CLA 2010-10-15 11:38:13 EDT
(In reply to comment #1)
> wget is disabled for security reasons, and we really don't want to be spawning
> processes on our mission-critical services. In fact, down, the road, git and
> dev.eclipse.org will not have the ability to initiate Internet conversations on
> our own.
> 
> From here, you have a few options:
> 
> 1. Continue polling.  It's not ideal, but it is more secure for us that way.
> 
> 2. Move your build process to our Hudson instance on hudson.eclipse.org.
> 
> 3. Use the build server, build.eclipse.org, to trigger your build with wget. 
> It could poll git from behind our firewall, which at least won't use Internet
> bandwidth (yours or ours).

If wget does not work, what about sending an email from inside the post-receive hook? That one could be parsed to trigger the build on the build machine itself.
Comment 3 Denis Roy CLA 2010-10-15 11:41:38 EDT
Yep, that is perfectly acceptable.  Consider it option 4  :)
Comment 4 Markus Kuppe CLA 2010-10-15 11:45:17 EDT
(In reply to comment #3)
> Yep, that is perfectly acceptable.  Consider it option 4  :)

Please chown /gitroot/ecf/org.eclipse.ecf.git to rt.ecf so that I can create a hook.
Comment 5 Markus Kuppe CLA 2010-10-15 11:46:38 EDT
Btw. git-core comes with a post-receive-email hook usually shipped in /usr/share/doc/git-core/contrib/hooks. That's the one I intent to use.
Comment 6 Denis Roy CLA 2010-10-15 13:50:42 EDT
I've created a file called /gitroot/ecf/org.eclipse.ecf.git/hooks/post-receive which you own.  If I make you the owner of the directory, that would enable you to h4x0r my super update hook.