Re: Passing parameters during force build

"John Burrows" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
You can do it in one of two ways:

1) Use the JMX interface (default is port 8000) for forcing, pausing, building with a specific target and when you enter the target in the field provided, enter other parameters you would like to use. Example:
	Instead of just entering the target "build-with-files", 
	You enter something like " -Dparameter=value -Dparameter2=value2 -verbose build-with-files", just like you would on a command line.

2) Write your own jsp interface and have a form to fill out what entries you want and when you submit it in the background, you utilize the format:
	document.getElementById('serverData').innerHTML = '<iframe src="' + 'http://' + hN + ':8000/invoke?operation=buildWithTarget&objectname=CruiseControl+Project%3Aname%3D' + pN + '&value0=build -verbose' + '&type0=java.lang.String' + '" width="0" height="0" frameborder="0"></iframe>';

	hN = Cruisecontrol Server name
	pN = Project Name
	See where I added the -verbose after the &value0=build (build is the target), you would add whatever you want instead of the -verbose as stated in the first suggestion.

	I basically replaced the build button on the main page with a javascript function that opens a separate page/windowed form that I fill out with any parameters via radio buttons, drop downs and text fields, which in turn has a submit button that utilizes the #2 above suggestion passing all the parameters to the Cruisecontrol queue.

Hope this helps.

John Burrows
Release Engineer, SCM / Release Engineering
S1 Corporation
 
Notice: This communication contains information that may be privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this transmission in error, please immediately contact the sender and delete this communication.
-------------------------------------------------------------------------------------------------------------



------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.