CircleCI 2.0 on Phabricator?


#1

Is there a way today to have Phabricator work with CircleCI 2.0? Our company would like to migrate toward Phabricator but without CircleCI we cannot do so.

I found Phabricator CircleCI Integration and https://github.com/signalfx/phabricator-circleci but I don’t think neither of them target CircleCI 2.0 - since 1.0 was deprecated as of August.

I would love ot get help on how to set this up as it’s the final barrier to our migration to Phabricator.


#2

See https://secure.phabricator.com/T13188
Bottom line is that it’s not likely to work.


#3

Is there a workaround? Especially since the blocker seems to be webhooks. It’s possible to trigger an HTTP call manually using say, curl in the workflow.

Especially if all we nede to do is POST an xunit.xml into a pre-determined webhook somehow


#4

Phabricator code only supports CircleCI api 1.0, which doesn’t exist any more.
The only other integration built by Phabricator team is “Buildkite”, which I can honestly say I have no information about.

The other approach is to build some integration on your end using the “make HTTP call” build step: HM makes a call to the CI system, and the CI runs the build and calls back to tell HM that it’s done.

in https://secure.phabricator.com/T9456 you may see some options about integrating other CI systems using tools other than “official support”. Uber’s Jenkins Plugin is probably the most used integration plugin for CI.

It’s also possible to use HM with Drydock as your CI pipeline, but it’s more complicated (I don’t know if anyone is using it other then the upstream).

If you can switch to another CI, it might make sense to use one of the things listed in T9456. If you have to use CircleCI, you’ll need to get some things to work in a new way - either by writing a gateway service to mimic CCI 1.0, or by making some local changes to Phabricator to make it work.


#5

Some very large installs are using it, but the breakpoint where the value it provides is higher than the cost of configuring it is currently very far down the complexity/scale axis. It’s likely more attractive if you’re running 1,000 simultaneous builds than if you’re running 5.


#6

How would “roll our own” look like? we could use circleci’s API to fire a job but how would we get the results back? would we need to implement a webhook?


#7

Yes, you’ll need to implement something to monitor the CCI build, and file either a webhook to Phabricator, or use the harbormaster.sendmessage conduit method to “complete” the HM build.


#8

I just followed the instructions for CircleCI 1.0 and have had no issues so far. I turned on a Harbormaster rule to run a CircleCI Build plan.

I have the following block at the very end of my CircleCI configuration and am using version 2.0:
notify: webhooks: - url: http://[my-phabricator-location]/harbormaster/hook/circleci/