QuickBuild Documentation
|
Build request object can be used to request new build or cancel running build. Request new buildSyntaxNew build can be requested by posting XML representation of the build request object to below url: http://localhost:8810/rest/build_requests
A sample XML of build request object is like below: <com.pmease.quickbuild.BuildRequest> <!-- This element tells QuickBuild in what configuration to trigger build. --> <configurationId>10</configurationId> <!-- This element tells whether or not to respect build condition of the configuration. If this is set to true, and if the build condition evaluates to false, build will not be triggered. --> <respectBuildCondition>false</respectBuildCondition> <!-- This element is optional and is used to specify variables for build triggering. If specified, it will override the variable with the same name defined in configuration basic setting. --> <variables> <entry> <string>var_name1</string> <string>var_value1</string> </entry> <entry> <string>var_name2</string> <string>var_value2</string> </entry> </variables> <!-- This element is optional and is used to tell QuickBuild to request a build promotion. --> <promotionSource> <!-- This element is optional and is used to tell QuickBuild that the source build resides on another QuickBuild server. --> <server> <url>http://another-qb-server:8810</url> <userName>admin</userName> <password>admin</password> </server> <!-- Identifier of the source build to promote from --> <buildId>697</buildId> <!-- This element is optional and used to specify files to promote --> <deliveries> <com.pmease.quickbuild.FileDelivery> <srcPath>artifacts/dir1</srcPath> <filePatterns>**/*.jar</filePatterns> </com.pmease.quickbuild.FileDelivery> <com.pmease.quickbuild.FileDelivery> <srcPath>artifacts/dir2</srcPath> <filePatterns>**/*.war</filePatterns> </com.pmease.quickbuild.FileDelivery> </deliveries> </promotionSource> </com.pmease.quickbuild.BuildRequest> The response is of mime type text/plain and the content is XML representation of request result including the generated build request id. Http status code 204 (No Content) will be returned if the request is aggregated. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have RUN_BUILD permission for the requested configuration. DemoWe use curl to demonstrate how to request a build in configuration root/test:
Delete a Build RequestSyntaxExisting build request can be deleted using http DELETE method through below url: http://localhost:8810/rest/build_requests/<build request id>
SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have STOP_BUILD permission for the associated configuration. DemoWe use curl to demonstrate how to delete build request 0136ed89-d47f-4307-8e69-c8535fae0e84: curl -X DELETE -u admin:admin http://localhost:8810/rest/build_requests/0136ed89-d47f-4307-8e69-c8535fae0e84
|