Homec4science

Add `harbormaster.createartifact`

Authored by epriestley <git@epriestley.com> on Aug 15 2015, 16:28.

Description

Add harbormaster.createartifact

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:
{F715633}

{F715634}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8659

Differential Revision: https://secure.phabricator.com/D13900

Details

Committed
epriestley <git@epriestley.com>Aug 15 2015, 16:28
Pushed
aubortJan 31 2017, 17:16
Parents
rPH8692f4857bed: Fix an issue with ClassMap handling of DivinerAtomizers
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH57b0353034c5: Add `harbormaster.createartifact` (authored by epriestley <git@epriestley.com>).Aug 15 2015, 16:28