Configuration API
The Cruise API documented here is about work in progress. Future versions may change this API.
Adding a new Pipeline
To add a pipeline, you perform a PUT to the URL http://[server]/cruise/tab/admin/pipelines/[pipeline_name].json where pipeline_name is the name of the pipeline that you wish to create. Creating a pipeline supports the following parameters:
General parameters
| parameter name | example value | required | Description |
|---|---|---|---|
| builder | ant | No | can be 'ant', 'nant', 'rake' or 'exec' |
| buildfile | build.xml | No | Not allowed for exec |
| target | all | No | Not allowed for exec |
| command | unittest.sh arg1 arg2 | No | Required for exec |
| source | pkg | No | no default value |
| dest | installer | No | no default value |
Subversion
| parameter name | example value | required | Description |
|---|---|---|---|
| scm | svn | No | Default value is 'svn' |
| url | http://xxx.xx.xx.xx/mysvn/trunk | Yes | The URL of the Subversion repository |
| username | checkout_username | No | |
| password | checkout_password | No |
For example, suppose you have switched on security and the username and the password are 'my_user' and 'my_password'. If you want to create a new pipeline named 'mypipeline', which uses an svn repository without username and password, and the location of repository is 'http://http://yoursvnrepository/trunk'. The command should be:
curl -u my_user:my_password -d "url=http://yoursvnrepository/trunk" http://yourservername:8153/cruise/tab/admin/pipelines/mypipeline.json
Mercurial
| parameter name | example value | required | Description |
|---|---|---|---|
| scm | hg | Yes | |
| url | http://xxx.xx.xx.xx/hg/my_project | Yes | The URL of the repository |
Git
| parameter name | example value | required | Description |
|---|---|---|---|
| scm | git | Yes | |
| url | git://github.com/foo/bar.git | Yes | The URL of the repository |
Perforce
| parameter name | example value | required | Description |
|---|---|---|---|
| scm | p4 | Yes | |
| url | p4server.foo.com:1666 | Yes | The P4PORT of the repository |
| username | checkout_username | No | The P4USER to connect to the repository |
| password | checkout_password | No | The P4PASSWD to connect to the repository |
| useTickets | true or false | No | |
| view | //depot/... //something/... | Yes |