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

DevOps Architect - Mentor - Coach - Trainer at Cotocus
Email - DevOps@RajeshKumar.xyz
CV - www.RajeshKumar.xyz

Total, Over 15 years of extensive experience working with more than 8 software MNCs for software development/maintenance and production environments involved in continuous improvement and automating entire life cycle using latest devops tools and techniques from design and architecture, through implementation, deployment, and successful operations. Also, helping more than 70 software organizations globally, providing coaching, mentoring and consulting in devops, CICD, cloud, containers and operations.

I help software organization to improve a quality of the software, reducing the software development/operational cost and immediate feedback/monitoring. Have in-depth working experience in following domains with real project implementation.

- Test Driven DevOps Approach
- Continuous Integration
- Continuous Delivery
- Continuous Deployment
- Continuous Inspection
- Technical Debt Reduction
- Containerization/Micro Services Using Kubernetes & Docker
- Cloud Migration using AWS
- Production Monitoring & Postmortem
Rajesh Kumar