To add a pipeline, you perform a POST 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:
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
General parameters
Parameters
| pipelineGroup |
defaultGroup |
No |
The name of the Pipeline Group to add the new pipeline to. The pipeline group will be created if it does not already exist. |
| 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
Parameters
| 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 |
|
Mercurial
Parameters
| scm |
hg |
Yes |
|
| url |
http://xxx.xx.xx.xx/hg/my_project |
Yes |
The URL of the repository |
Git
Parameters
| scm |
git |
Yes |
|
| url |
git://github.com/foo/bar.git |
Yes |
The URL of the repository |
Perforce
Parameters
| 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 |
|