Lately I have been working with a customer who wants to
enable their developers to deploy their own
SOA suite composites to a protected QA Server based on a checkout from Subversion.
As part of the customer's current composite promotion
process, the developers check their unit tested code
into Subversion and then email a build manager to checkout, build and deploy the code to the QA environment.
This approach introduces delay and places a signification administration burden on the person in the build manager role.
This blog post provides an example of how Hudson can be used
as a self service web page that allows developers
to initiate the automated checkout, build and deploy process.
It may be counter-intuitive to use Hudson as a manual build tool, but it fits the requirement nicely.
Download the Hudson war (version
3.0.1-b2) from http://hudson-ci.org/
Using your favorite text editor, create a
new text file named weblogic.xml and
add the following text contents to the file.
<?xml version="1.0" encoding="UTF-8"?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"> <container-descriptor> <prefer-application-packages> <package-name>org.apache.*</package-name> <package-name>org.dom4j.*</package-name> </prefer-application-packages> </container-descriptor> </weblogic-web-app>
Update the hudson war file by adding the weblogic.xml file
# jar uvf hudson.war WEB-INF/weblogic.xml
Using the weblogic console, deploy the
hudson.war as an application.
The Hudson main page should then be accessible from a browser
For example at the url http://localhost:7001/hudson-3.0.1/
The Hudson default configuration allows all users to perform
This section will add an Admin user will full rights and restrict the rights of all other users.
Select Manage Hudson / Security from the Hudson main page.
1) Check the Enable security checkbox
2) Select Hudson's own user database
3) Select 'Anyone can do anything'
Add an admin user
1) From the Hudson main page Select the 'sign up' link in the
upper right corner
2) Add an user named admin (or other user name) and enter a desired password..
3) Press the Sign up button and the admin user should be created and logged on.
Switch to Matrix-based Security
1) Log on as the admin user (if required)
2) Select Manage Hudson / Security from the Hudson main page.
3) Change the security setting from ' anyone can do anything'
to ''Matrix - based Security'
4) Add a row for the newly created admin user and
check as needed to enable all boxes.
5) Finally modify the Anonymous user row to enable only Overall-Read, Job-Read and Job-Build
Now the admin user can perform all actions including creating
and modifying jobs.
Anonymous (not logged in) users visiting the site can run
jobs but not create or modify them.
Optionally each user can register, but the matrix must be configured for each user id.
Select the 'This job is parametrized' checkbox and add the following
four String Parameters. For each parameter, enter the Name, Default value if any
and descriptions for each field as follows:
(Note: the Name field is case sensitive.
: the Default Value for the CompositeSearchPoint parameter is a period.