Helix Core Trigger script variables Reference Guide

Use the following variables in the command field to pass data to a trigger script:
 
Argument
Description
Available for type
%action%
Either null or a string reflecting an action taken to a changelist or job.
For example, “pending change 123 added” or “submitted change 124 deleted” are possible %action% values on change forms, and “job000123 created” or “job000123 edited” are possible %action% values for job forms.
form-commit
%changelist%, %change%
The number of the changelist being submitted. The abbreviated form %change% is equivalent to %changelist%.
A change-submit trigger is passed the pending changelist number; a change-commit trigger receives the committed changelist number.
change-submit,
change-content,
change-commit,
fix-add,
fix-delete,
form-commit,
shelve-commit
%changeroot%
The root path of files submitted
change-commit
%client%
Triggering user’s client workspace name.
all but archive
%clienthost%
Hostname of the client.
all but archive
%clientip%
The IP address of the client.
all but archive
%jobs%
A string of job numbers, expanded to one argument for each job number specified on a p4 fix command or for each job number added to (or removed from) the Jobs: field in a p4 submit, or p4 change form.
fix-add
fix-delete
%oldchangelist%
If a changelist is renumbered on submit, this variable contains the old changelist number.
change-commit
%serverhost%
Hostname of the Perforce server.
all but archive
%serverip%
The IP address of the server.
all but archive
%serverport%
The IP address and port of the Perforce server, in the format ip_address:port.
all but archive
%serverroot%
The P4ROOT directory of the Perforce server.
all but archive
%user%
Perforce username of the triggering user.
all but archive
%formfile%
Path to temporary form specification file. To modify the form from an in or out trigger, overwrite this file. The file is read-only for triggers of type saveand delete.
form-commit,
form-save,
form-out,
form-in,
form-delete
%formname%
Name of form (for instance, a branch name or a changelist number).
form-commit,
form-save,
form-out,
form-delete
%formtype%
Type of form (for instance, branch, change, and so on).
form-commit,
form-save,
form-out,
form-in,
form-delete
%op%
Operation: read, write, or delete
archive
%file%
Path of archive file based on depot’s Map: field.
If the Map: field is relative to P4ROOT, the %file% is a server-side path relative to P4ROOT.
If the Map: field is an absolute path, the %file% is an absolute server-side path.
archive
%rev%
Revision of archive file
archive
Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x