QuickBuild2 Documentation
|
Build psuedo idTo facilitate the interaction with builds, the build psuedo id is used. A build psuedo id is of below formats:
Access build by psuedo idSyntaxBuild can be accessed by build psuedo id using http GET method through below url: http://localhost:8810/rest/build?id=<build psuedo id>
The response is of mime type application/xml, and the content is xml representation of the build. SecurityYou will need to use http BASIC authentication to login as an authorized QuickBuild user if the anonymous does not have permission to access belonging configuration of requested build. DemoBelow curl command demostrates how to access xml representation of the latest build of the configuration with id 2: curl -u admin:admin http://localhost:8810/rest/build?id=2.latest
Access build by configuration id and build versionSyntaxBuild can be accessed by configuration id and build version using http GET method through below url: http://localhost:8810/rest/build?configuration_id=<configuration id>&version=<build version>
The response is of mime type application/xml, and the content is xml representation of the build. SecurityYou will need to use http BASIC authentication to login as an authorized QuickBuild user if the anonymous does not have permission to access belonging configuration of requested build. DemoBelow curl command demostrates how to access xml representation of build 1.0.6 in configuration with id 2: curl -u admin:admin "http://localhost:8810/rest/build?configuration_id=2&version=1.0.6"
Access build status by psuedo idSyntaxBuild status can be accessed by build psuedo id using http GET method through below url: http://localhost:8810/rest/build/status?id=<build psuedo id>
The response is of mime type text/plain, and the content is string representation of the build status. SecurityYou will need to use http BASIC authentication to login as an authorized QuickBuild user if the anonymous does not have permission to access belonging configuration of requested build. DemoBelow curl command demostrates how to access build status of latest build in configuration with id 2: curl -u admin:admin http://localhost:8810/rest/build/status?id=2.latest
Access build id by psuedo idSyntaxBuild id can be accessed by build psuedo id using http GET method through below url: http://localhost:8810/rest/build/id?id=<build psuedo id>
The response is of mime type text/plain, and the content is string representation of the build id. SecurityYou will need to use http BASIC authentication to login as an authorized QuickBuild user if the anonymous does not have permission to access belonging configuration of requested build. DemoBelow curl command demostrates how to access build id of latest build in configuration with id 2: curl -u admin:admin http://localhost:8810/rest/build/id?id=2.latest
Access executed steps by build psuedo idSyntaxExecuted steps of a build can be accessed by psuedo id using http GET method through below url: http://localhost:8810/rest/build/steps?id=<build psuedo id>
The response is of mime type application/xml, and the content is the list of steps executed in the build. SecurityYou will need to use http BASIC authentication to login as QuickBuild administrator if the anonymous does not have administrative permission. DemoBelow curl command demostrates how to access executed steps by latest build in configuration with id 2: curl -u admin:admin http://localhost:8810/rest/build/steps?id=2.latest
Access used repositories by build psuedo idSyntaxUsed repositories of a build can be accessed by psuedo id using http GET method through below url: http://localhost:8810/rest/build/repositories?id=<build psuedo id>
The response is of mime type application/xml, and the content is the list of repositories used in the build. SecurityYou will need to use http BASIC authentication to login as QuickBuild administrator if the anonymous does not have administrative permission. DemoBelow curl command demostrates how to access used repositories by latest build in configuration with id 2: curl -u admin:admin http://localhost:8810/rest/build/repositories?id=2.latest
Search buildsSyntaxBuilds can be searched using http GET method through below url: http://localhost:8810/rest/builds?<search criteria1>=<value1>&<search criteria2>=<value2>&...
Query string part of the url represents various search criterias to restrict the search result. Supported search criterias are:
If no any search criterias specified, all builds in the system will be returned. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have permission to access returned builds. DemoBelow curl commands demonstrates how to combine different criterias to perform search:
Trigger buildSyntaxBuild can be triggered by posting the triggering parameter xml to below url: http://localhost:8810/rest/trigger
A sample triggering parameter xml is like below: <com.pmease.quickbuild.rest.TriggerParams> <!-- This element tells QuickBuild in what configuration to trigger build. --> <configurationId>2</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 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>name1</string> <string>value1</string> </entry> <entry> <string>name2</string> <string>value2</string> </entry> </variables> <!-- This element tells QuickBuild whether or not to wait for finishing of the build. --> <waitForFinish>false</waitForFinish> </com.pmease.quickbuild.rest.TriggerParams> The response is of mime type text/plain and the content is string representation of newly generated build id. If the element respectBuildCondition is set to true, and if the build condition evaluates to false, id of latest build of specified configuration will be returned instead. 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 trigger a build in configuration with id 2:
Promote buildSyntaxBuild can be promoted by posting the promotion parameter xml to below url: http://localhost:8810/rest/promote
A sample promotion parameter xml is like below: <com.pmease.quickbuild.rest.PromoteParams> <!-- This element represents the destination configuration of the promotion process. --> <configurationId>5</configurationId> <!-- This element defines the promotion source, including id of the build to be promoted, and the files to be promoted. The _files_ element is optional. --> <promotionSource> <buildId>100</buildId> <files> <com.pmease.quickbuild.rest.RetrieveFiles> <srcPath>artifacts</srcPath> <patterns>**</patterns> </com.pmease.quickbuild.rest.RetrieveFiles> </files> </promotionSource> <!-- This element is optional and can be used to specify variables for the promotion process. --> <variables> <entry> <string>name1</string> <string>value1</string> </entry> <entry> <string>name2</string> <string>value2</string> </entry> </variables> </com.pmease.quickbuild.rest.PromoteParams> The response is of mime type text/plain and the content is string representation of newly generated build id as result of the promotion. SecurityYou will need to use http BASIC authentication to login as authorized QuickBuild user if the anonymous does not have PROMOTE_BUILD permission for the destination configuration. DemoWe use curl to demonstrate how to promote all artifacts of build with id 100 to configuration with id 2:
Update buildSyntaxBuild can be updated by posting xml representation of the build to below url: http://localhost:8810/rest/builds
Please note that the configuration element denotes id of the belonging configuration. SecurityYou will need to use http BASIC authentication to login as administrator if the anonymous does not have administrative rights. DemoWe will use curl to demonstrate how to move the build to be under another configuration. Let's assume the build id is 100, and the destination configuration id is 6.
Create buildSyntaxBuild can be created by posting xml representation of the build to below url: http://localhost:8810/rest/builds
Please note that:
SecurityYou will need to use http BASIC authentication to login as administrator if the anonymous does not have administrative rights. DemoWe will use curl to demonstrate how to create a new build by copying an existing build with id 100.
Cancel buildSyntaxBuild can be cancelled using http GET method through below url: http://localhost:8810/rest/cancel?id=<build id>
Here <build id} stands for id of the build to be cancelled. SecurityYou will need to use http BASIC authentication to login as authenticated QuickBuild user if the anonymous does not have STOP_BUILD permission on the belonging configuration. DemoBelow curl command demonstrates how to cancel the build with id 100: curl -X DELETE -u admin:admin http://localhost:8810/rest/canceld?id=100
Delete buildSyntaxBuild can be deleted using http DELETE method through below url: http://localhost:8810/rest/build?id=<build id>
Here <build id} stands for id of the build to be deleted. SecurityYou will need to use http BASIC authentication to login as administrator if the anonymous does not have DELETE_BUILD permission on the belonging configuration. DemoBelow curl command demonstrates how to delete the build with id 100: curl -X DELETE -u admin:admin http://localhost:8810/rest/build?id=100
|