Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up the hudson-post-receive script #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Cleaned up the hudson-post-receive script #3

wants to merge 7 commits into from

Conversation

boxerab
Copy link

@boxerab boxerab commented Apr 21, 2011

Hi Stephen,
So, here is another version of the post receive script. I made the script work via either the command line,
or called from another script: in my case, I do call it from the main post-receive script, along with a few other "post receive" scripts, and so I can't read the parameters in from command line or they won't be available to my other scripts. I have also made the hudson user name and password configurable. And, following your suggestion, I only read USER_EMAIL from git log if it has not been set.

Check it out and let me know what you think.

Cheers,
Aaron

@stephenh
Copy link
Owner

Hi Aaron,

Thanks for revising the patch. I'm taking a look at integrating it. One question, for running multiple post receive scripts, did you see the sample file:

https://github.com/stephenh/git-central/blob/master/server/post-receive.sample

This lets you capture the stdin input into a variable and pass it along to multiple separate post-receive hooks. Would this achieve what you needed without the need for the hudson()? (Also, I don't see where newrev is set the way you're calling the script--it's used to conditionally get the email address. oldrev isn't currently used, but I think it'd be simpler to keep the script assuming it is passed the standard post-receive stdin input.)

@boxerab
Copy link
Author

boxerab commented Apr 22, 2011

Cool, that echo trick would work. Also, yes, good idea to pass in all three post-receive inputs.
I can make these changes on my fork, if you like. And test it on my Hudson server.

@stephenh
Copy link
Owner

That'd be great, Aaron, thanks.

…structive for users

2. added post-receive-redmine script, which pushes changes to redmine copy of repository
3. improved post-receive-hudson: added configurable parent job name and parent branch name,
where the parent job is used as a template to create new hudson jobs (for new branches)
@boxerab
Copy link
Author

boxerab commented Apr 26, 2011

Hi Stephen,
I've added another commit that cleans up post-receive-hudson. I've also taken the liberty of putting my actual
post-receive script in the post-receive.sample file; I thought a working example would be useful.
Also, I ended up leaving in the hudson() method, because I thought it would be more flexible to read either from command line
and also stdin. So, I was curious about your reservations about using a function. Is it less portable?

Cheers,
Aaron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants