Any way to start a Perforce Personal Build from the REST API?

We are able to run personal builds with a Perforce Changelist unshelved, using the ‘run as personal build’ check box and then the ‘Shelved changelist ID’ field in the Team City UI dialog.  But is there any way to do it from the REST API?

When I look at the parameters on a build made using the dialog, it looks like there's a property ‘personal’ set to true, and also two properties ‘vcsRoot.<>.shelvedChangelist’ with the value of the CL, where <> is 1 and our project vc root name.  

But if I try to set those properties from REST, it does not result in the CL being unshelved.  Any ideas?

1
3 comments

Hi Sabibo,

I'm currently trying to do the same thing, were you able to find a way to make this work?

Thanks

Jason

0

Jason,

  No, I did not.  I ended up passing the unshelve CL number as an environment variable, and then unshelving the CL manually from a build step.

 

0

Later last night I was able to find this (under the P4 integration, not in the rest of the TC REST API docs): 

https://www.jetbrains.com/help/teamcity/integrating-teamcity-with-perforce.html#Running+Builds+on+Perforce+Shelved+Files

It does work but is limited to just the information in the URL: 

POST /app/perforce/runBuildForShelve?buildTypeId=<BUILD_TYPE_ID>&vcsRootId=<VCS_ROOT_ID>&shelvedChangelist=<SHELVED_CHANGELIST_ID>

It doesn't seem to want to pick up any other parameters that I wanted to change when initiating the build like other REST API calls. 

 

0

Please sign in to leave a comment.