Page MenuHomePhabricator

Add `harbormaster.createartifact`
ClosedPublic

Authored by epriestley on Aug 14 2015, 4:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 7:22 PM
Unknown Object (File)
Mon, Mar 25, 5:54 PM
Unknown Object (File)
Mon, Mar 25, 5:04 PM
Unknown Object (File)
Mon, Mar 25, 4:36 PM
Unknown Object (File)
Mon, Mar 25, 4:27 PM
Unknown Object (File)
Sat, Mar 23, 3:12 PM
Unknown Object (File)
Sat, Mar 23, 3:01 PM
Unknown Object (File)
Fri, Mar 15, 3:41 PM
Subscribers
None

Details

Summary

Ref T8659. In the general case, this eventually allows build processes to do things like:

  • Upload build results (like a ".app" or ".exe" or other binary).
  • Pass complex results between build steps (e.g., build step A does something hard and build step B uses it to do something else).

Today, we're a long way away from having the infrastructure for that. However, it is useful to let third party build processes (like Jenkins) upload URIs that link back to the external build results.

This adds harbormaster.createartifact so they can do that. The only useful thing to do with this method today is have your Jenkins build do this:

params = array(
  "uri": "https://jenkins.mycompany.com/build/23923/details/",
  "name": "View Build Results in Jenkins",
  "ui.external": true,
);
harbormaster.createartifact(target, 'uri', params);

Then (after the next diff) we'll show a link in Differential and a prominent link in Harbormaster. I didn't actually do the UI stuff in this diff since it's already pretty big.

This change moves a lot of code around, too:

  • Adds PHIDs to artifacts.
  • It modularizes build artifact types (currently "file", "host" and "URI").
  • It formalizes build artifact parameters and construction:
    • This lets me generate usable documentation about how to create artifacts.
    • This prevents users from doing dangerous or policy-violating things.
  • It does some other general modernization.
Test Plan

Screen Shot 2015-08-14 at 9.14.25 AM.png (181×688 px, 21 KB)

Screen Shot 2015-08-14 at 9.17.08 AM.png (1×1 px, 273 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Add `harbormaster.createartifact`.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Aug 14 2015, 8:18 PM
This revision was automatically updated to reflect the committed changes.