Helix Core Server Administrator Guide: Fundamentals (2018.2)

Triggering with depots of type graph

To associate the trigger with a single repo named //graphDepot1/repo8, specify the path as //graphDepot1/repo8/…​ with /…​ at the end.

To associate the trigger with multiple repos, such as //graphDepot1/repoA and //graphDepot2/repoB, use asterisks (*) to specify //graphDepot*/repo*/…​ as the path.

For information about depots of type graph, see Helix4Git Administrator Guide and P4 Command Reference.

Four variables apply:

  • %depotName% - The depot the repo resides in
  • %repoName% - The name of the repo
  • %repo% - The repo, which has .git as a suffix, but otherwise is identical to %repoName%
  • %pusher% - The user credited with the push

The following four types of graph triggers are described in the order they would normally execute:

graph-push-start

  • Fires prior to any data being transferred as part of a git push operation through the connector
  • Can enforce your workflow rules

graph-push-reference

  • Fires for each reference that is being created or updated
  • Can have logic to block the update, according to your workflow rules
  • If the trigger fails on any reference, the entire push is canceled

A graph-push-reference trigger passes the original reference value in the %oldValue% variable, the new value in the %newValue% variable, and the reference name in %reference%.

When such a trigger is fired from a push to the Git Connector:

  • the reference type is passed in the %refType% variable.
  • the %refFlags% variable is populated with a list of actions that are being applied to the reference.

graph-push-reference-complete

  • Fires after a reference has been created or updated as part of a git push operation through the connector
  • Same variables as graph-push-reference
  • Any trigger failures are ignored

graph-push-complete

  • Fires when a git push of a specified repo has successfully completed
  • You can use this trigger to signal that all the files are present and ready for a build, testing, or diagnostic tool.