git.droids-corp.org
/
git-central.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0bb65b2
)
Externalize hudson address to HUDSON_URL environment variable.
author
Stephen Haberman
<stephen@exigencecorp.com>
Tue, 21 Oct 2008 21:39:10 +0000
(16:39 -0500)
committer
Stephen Haberman
<stephen@exigencecorp.com>
Tue, 21 Oct 2008 21:39:10 +0000
(16:39 -0500)
server/post-receive-hudson
patch
|
blob
|
history
diff --git
a/server/post-receive-hudson
b/server/post-receive-hudson
index
9f57efa
..
d33d387
100644
(file)
--- a/
server/post-receive-hudson
+++ b/
server/post-receive-hudson
@@
-21,10
+21,10
@@
while read oldrev newrev refname ; do
exit 0
fi
exit 0
fi
- branch_config=$(wget -O -
http://cbas1:8080/hudson
/job/${short_refname}/config.xml 2>/dev/null)
+ branch_config=$(wget -O -
$HUDSON_URL
/job/${short_refname}/config.xml 2>/dev/null)
if [ $? -ne 0 ] ; then
# Create the job
if [ $? -ne 0 ] ; then
# Create the job
- stable_config=$(wget -O -
http://cbas1:8080/hudson
/job/stable/config.xml 2>/dev/null)
+ stable_config=$(wget -O -
$HUDSON_URL
/job/stable/config.xml 2>/dev/null)
if [ $? -ne 0 ] ; then
display_error_message "Could not get existing Hudson config for ${short_refname}"
exit 0
if [ $? -ne 0 ] ; then
display_error_message "Could not get existing Hudson config for ${short_refname}"
exit 0
@@
-39,7
+39,7
@@
while read oldrev newrev refname ; do
fi
# Make the new job
fi
# Make the new job
- wget --header "Content-Type: text/xml" --post-data="$branch_config" -O - "
http://cbas1:8080/hudson
/createItem?name=${short_refname}" >/dev/null 2>/dev/null
+ wget --header "Content-Type: text/xml" --post-data="$branch_config" -O - "
$HUDSON_URL
/createItem?name=${short_refname}" >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
display_error_message "Could not create new Hudson job for ${short_refname}"
exit 0
if [ $? -ne 0 ] ; then
display_error_message "Could not create new Hudson job for ${short_refname}"
exit 0
@@
-50,7
+50,7
@@
while read oldrev newrev refname ; do
branch_config="${branch_config/<recipients>/<recipients>$USER_EMAIL }"
# Update the config
branch_config="${branch_config/<recipients>/<recipients>$USER_EMAIL }"
# Update the config
- wget --header "Content-Type: text/xml" --post-data="$branch_config" -O - "
http://cbas1:8080/hudson
/job/${short_refname}/config.xml" >/dev/null 2>/dev/null
+ wget --header "Content-Type: text/xml" --post-data="$branch_config" -O - "
$HUDSON_URL
/job/${short_refname}/config.xml" >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
display_error_message "Could not add $USER_EMAIL to Hudson job ${short_refname}"
exit 0
if [ $? -ne 0 ] ; then
display_error_message "Could not add $USER_EMAIL to Hudson job ${short_refname}"
exit 0