Page MenuHomePhabricator

git/arc/branching workflow
Closed, ResolvedPublic

Asked by axel.hooge on Oct 6 2015, 7:52 PM.

Details

General Workflow

Hi,

i've some questions for git/arc/branching workflow:

We want to develop in featurebranches:
User runs "arc feature coolNewFeature origin/master"
We want to use reviews:
do some cool stuff
git commit -a
do more stuff
git commit -a
arc diff

reviewer accepts the diff.

Now lets say, we want to use a kind of continuous integration and deploy featurebranches to a staging area and if everything is ok, merge it to master (or stable branch?) and deploys it to production.

Is it right if we do:
git push --set-upstream origin coolNewFeature

Some CI system checkout branch from repository and deploys it
The developer do some tests on staging

After that, the developer runs "arc land"
Some CI system updates master from repository and deploys it

Is it correct? Or is there any documentation about such workflows? Phabricator itself uses a stable-branch, right?

Thanks in advice
Best regards,
Axel

Answers

avivey
Updated 3,108 Days Ago

Look at T9456 for integration with 3rd party CI tools.
See https://secure.phabricator.com/book/phabricator/article/harbormaster/ for configuring the build server.

Basically, we like the CI to happen on the Revision, before the actual manual review (So things can get fixed before humans need to see them), but your approach is not unreasonable.

Looks like you want 2 buttons:

  1. Deploy this change to Staging
  2. Merge this and then Deploy to Prod

  1. Deploy this to Staging:

You can add a custom button to Differential Revisions, that will trigger a build (Although it's a little involved, and requires you to write a PHP class). You can also manually run a Harbormaster job.
Write a HM job (That calls your CI server) that takes the content of your change (See here) and deploys to staging.
This will not scale to more than 1 environment, but the tools for doing this "properly" are still in development and may be a little while before they're ready for you to play with.

  1. Merge this and then deploy to prod:

You can get this by triggering a "Deploy to Prod" build via Herald and Harbormaster. In practice, this job will just call your "real" CI to do the work.
Then "arc diff" will merge the revision to master, and Herald will do the rest.

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.