What variables are available for build step URIs?


You can reference variables such as ${buildable.revision} in a build step URI. Is there a list of all of these? I am specifically interested in the repository name for the commit.


Missing "Accepted Differential revision" condition in "Commit Content" Herald rule

Scroll down in the Build Step page. The list is below the fold.


sigh that’s embarrassing. Thanks for setting me straight.

Too bad it doesn’t have the name. I guess I’ll have to settle on the ALLCAPSCALLSIGN for ‘names’.


It should have the repo phid, which will let you get all the data via another conduit call?


Yes, I’m sure I can get there. But, that doesn’t fit nicely into a field in Jenkins where I can reference environment/from-url variables.


If you want the {repository.name} it might be as simple as just adding it into the build variables in


I’ve not done this for repository commits, but I have done the same for maniphest.tasks.

In a HTTP request, I’ve often found there aren’t enough/correct build variables. I know we can pass on the PHID, but in the past I didn’t want to pass over the PHID just for the destination service have to call back to phabricator to get basic information.

Try this pseudo code…

  public function getBuildVariables() {
    $results = array();

    $results['buildable.commit'] = $this->getCommitIdentifier();
    $repo = $this->getRepository();

    $results['repository.callsign'] = $repo->getCallsign();
    $results['repository.phid'] = $repo->getPHID();
    $results['repository.vcs'] = $repo->getVersionControlSystem();
    $results['repository.uri'] = $repo->getPublicCloneURI();

+   $results['repository.name'] = $repo->getName();

    return $results;

    public function getAvailableBuildVariables() {
    return array(
      'buildable.commit' => pht('The commit identifier, if applicable.'),
      'repository.callsign' =>
        pht('The callsign of the repository in Phabricator.'),
      'repository.phid' =>
        pht('The PHID of the repository in Phabricator.'),
      'repository.vcs' =>
        pht('The version control system, either "svn", "hg" or "git".'),
      'repository.uri' =>
        pht('The URI to clone or checkout the repository from.'),
+     'repository.name' =>
+        pht('The name of the repository in Phabricator.'),