Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Hudson plugins github, git to hudson-setup

  • Loading branch information...
commit 9157df4af5954f5bce09b1a02b18bf51b03717fe 1 parent 4d3fddb
@tdiesler tdiesler authored
View
6 .gitattributes
@@ -0,0 +1,6 @@
+*.bat text ident
+*.java text ident
+*.properties text ident
+*.sh text ident
+*.txt text ident
+*.xml text ident
View
4 .gitignore
@@ -0,0 +1,4 @@
+.settings
+target
+*/.settings
+*/target
View
7 hudson/ant.properties.example
@@ -27,9 +27,10 @@ jboss.bind.address=127.0.0.1
# Hudson Default settings
# -----------------------
-# hudson.root=/home/username/workspace/hudson/jboss-osgi
-# hudson.admin=username
-hudson.version=1.377
+hudson.root=/usr/share/tomcat6/workspace/hudson/jbosgi
+hudson.version=1.382
+github.plugin.version=0.2
+git.plugin.version=1.1
# JBoss Distributions
# -------------------
View
39 hudson/build.xml
@@ -32,8 +32,7 @@
<!-- Setup property defaults -->
<property environment="env"/>
<property name="username" value="${env.USER}" />
- <property name="hudson.admin" value="${env.USER}" />
- <property name="hudson.root" value="/home/${hudson.admin}/workspace/jboss-osgi" />
+ <property name="hudson.root" value="/home/${username}/workspace/hudson/jbosgi" />
<xmlproperty file="${project.root.dir}/pom.xml"/>
<property name="version.id" value="${project.version}"/>
@@ -44,7 +43,6 @@
<property name="hudson.jboss" value="${hudson.root}/jboss"/>
<echo/>
- <echo message="hudson.user = ${hudson.admin}"/>
<echo message="hudson.root = ${hudson.root}"/>
<echo message="hudson.home = ${hudson.home}"/>
<echo/>
@@ -60,10 +58,29 @@
<fail message="Cannot use default hudson username: ${hudson.admin}" if="hudson.admin.changeme"/>
</target>
+ <target name="init-thirdparty" depends="init-hudson">
+ <property name="thirdparty.dir" value="${hudson.target.dir}/thirdparty"/>
+ <mkdir dir="${thirdparty.dir}"/>
+ <available property="apache.tomcat.available" file="${thirdparty.dir}/apache-tomcat.zip"/>
+ <available property="hudson.war.available" file="${thirdparty.dir}/hudson.war"/>
+ <available property="jboss600.available" file="${thirdparty.dir}/jboss-6.0.0.M3.zip"/>
+ </target>
+
+ <!--
+ Get thirdparty dependencies
+ -->
+ <target name="thirdparty" depends="init-thirdparty,get-hudson">
+ </target>
+ <target name="get-hudson" depends="init-thirdparty" unless="hudson.war.available">
+ <get src="http://hudson-ci.org/download/war/${hudson.version}/hudson.war" dest="${thirdparty.dir}/hudson.war" usetimestamp="true" verbose="true"/>
+ <get src="http://hudson-ci.org/download/plugins/github/${github.plugin.version}/github.hpi" dest="${thirdparty.dir}/github.hpi" usetimestamp="true" verbose="true"/>
+ <get src="http://hudson-ci.org/download/plugins/git/${git.plugin.version}/git.hpi" dest="${thirdparty.dir}/git.hpi" usetimestamp="true" verbose="true"/>
+ </target>
+
<!--
Setup the Hudson Tomcat instance
-->
- <target name="hudson-tomcat-setup" depends="init-hudson">
+ <target name="hudson-tomcat-setup" depends="thirdparty">
<property file="${tomcat.conf}"/>
<fail unless="HUDSON_HOME">
@@ -71,9 +88,23 @@
echo 'HUDSON_HOME=${hudson.home}' >> ${tomcat.conf}
</fail>
+ <!-- Install Hudson -->
+ <copy todir="${tomcat.base}/webapps" file="${thirdparty.dir}/hudson.war"/>
+ <copy todir="${hudson.home}/plugins" file="${thirdparty.dir}/github.hpi"/>
+ <copy todir="${hudson.home}/plugins" file="${thirdparty.dir}/git.hpi"/>
+
</target>
<!--
+ Update the Hudson version
+ -->
+ <target name="hudson-update" depends="init-thirdparty">
+ <get src="http://hudson-ci.org/download/war/${hudson.version}/hudson.war" dest="${thirdparty.dir}/hudson.war" usetimestamp="false" verbose="true"/>
+ <delete dir="${tomcat.base}/webapps/hudson"/>
+ <copy todir="${tomcat.base}/webapps" file="${thirdparty.dir}/hudson.war" overwrite="true"/>
+ </target>
+
+ <!--
Setup the Hudson QA environment
-->
<target name="hudson-setup" depends="init-hudson,hudson-tomcat-setup" description="Setup the Hudson QA environment">
Please sign in to comment.
Something went wrong with that request. Please try again.