# This is the config file for various workflow triggers: # - CreateSwarmReview.py # - CheckSubmitHasReview.py # - DefaultSwarmReviewDesc.py # - RequireJob.py # In an SDP installation the default location is /p4/common/config # But it can be specified on the command line (so in trigger table entry) # It is a standard Yaml format - when in doubt put quotes around string values! # api: API version for Swarm. "api/v6" is 2017.2 api: "api/v6" # user: Perforce user name to access Swarm as user: p4swarm # ticket: P4 Ticket for the above user - generate with: # p4 -u <username> login -ap ticket: AA1233C0FD5EF69605B08070AFB86711 # review_description: The default review description. # Can be a single quoted string (with embedded '\n' for newlines, or an array of quoted strings. # The values $jobDescription and $changeDescription if found will be expanded as # appropriate. review_description: - "$jobDescription" - "" - "<Please edit these fields as desired>" - "Review type: Delta/Full" # ------------------------------------------ # For CheckFixes.py # Note the use of fix_allowed_paths per project. # fix_state_field: the name of the field in the Perforce job spec fix_state_field: "JiraStatus" # link_allowed_states: An array of values for fix_state_field in which links are allowed to be created # or deleted between jobs and changelists fix_allowed_states: - "Accepted" # msg_cant_link_jobs: An array of lines for the message # For legibility it is good to have the first line blank msg_cant_link_jobs: - "" - "You are not allowed to link changes to or unlink changes from these jobs" - "because of the state of their associated JIRA issues." - "Please change the state first in JIRA and try again." # ------------------------------------------ # For CheckSubmitHasReview.py # Allow certain users to submit directly without review being required # An array of user IDs submit_without_review_users: - jenkins # msg_submit_requires_review: An array of lines for the message # For legibility it is good to have the first line blank msg_submit_requires_review: - "" - "You are not allowed to submit a change without a review." - "Please shelve the change for Swarm review first." - "Jenkins will build the change and if successful submit on your behalf." # msg_submit_test_must_pass: An array of lines for the message # For legibility it is good to have the first line blank msg_submit_test_must_pass: - "" - "You are not allowed to submit a change unless the review has successfully" - "passed the Jenkins build/test phase." - "Please check the result of the Jenkins job and rebuild if necessary." # ------------------------------------------ # Projects - an array of project entries # Each project expected to have entries for: # require_job: y/n - for pre-submit or pre-shelve trigger - whether a job is required or not # post_submit_create_review: y/n - whether to create a review on submit # pre_submit_require_review: y/n - read by CheckSubmitHasReview.py to avoid bypassing pre-submit review # Also SwarmReviewTemplate.py to set review description to value of 'review_description' # pre_submit_test_must_pass: y/n - read by CheckSubmitHasReview.py to make sure Jenkins build/test passed # Is only relevant if pre_submit_require_review=y # swarm_review_template: y/n - read by SwarmReviewTemplate.py (relevant if pre_submit_require_review=n) # Updates review description to value of 'review_description' # update_review: y/n - if y then try and update the first review found associated with linked job # depot_paths: an array of values for which to process other fields # Controlling here allows you to not have to update the trigger table entry every # time you wish to adjust. Also, it is possible to have this file be updated by ordinary # users and not just superusers. You can even auto-sync this file if required via trigger. # Use quotes if spaces in the path, or if you have an exclude mapping ("-//some/path/...") # fix_allowed_paths: an array of depot paths for which the CheckFixes.py checkes shown above # does not apply. This allows integrators to copy up changes (thus creating a new submit), # even when the associated issue is closed. Specify one or more paths with wildcards where # you will let submits to be handled. # Same rules for quoting as for depot_paths, and exclude mappings also possible # If field empty or not present then there are no exclusions projects: - name: ProjectA post_submit_create_review: y pre_submit_require_review: y pre_submit_test_must_pass: y swarm_review_template: n require_job: y update_review: n depot_paths: - //depot/inside/... - "-//depot/inside/....c" fix_allowed_paths: - //depot/inside/rel/... - name: ProjectB post_submit_create_review: n pre_submit_require_review: n pre_submit_test_must_pass: n swarm_review_template: y require_job: y update_review: n depot_paths: - //depot/inside/B/... - //depot/inside/C/...
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 27331 | C. Thomas Tyler |
Released SDP 2020.1.27325 (2021/01/29). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#3 | 25933 | C. Thomas Tyler |
Released SDP 2019.2.25923 (2019/08/05). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#2 | 25245 | C. Thomas Tyler |
Released SDP 2019.1.25238 (2019/03/02). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#1 | 23510 | C. Thomas Tyler |
Released SDP 2018.1.23504 (2018/01/19). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev', with selective removal of work-in-progress files. |
||
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/triggers/Workflow.yaml | |||||
#2 | 23419 | Robert Cowham |
Refer to Workflow.yaml Change name of field from create_review to post_submit_create_review |
||
#1 | 23418 | Robert Cowham |
New trigger with test. Reworked sample yaml file to Workflow.yaml |
||
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/triggers/CreateSwarmReview.yaml | |||||
#3 | 23131 | Robert Cowham | New RequireJob pre-submit trigger. | ||
#2 | 23122 | Robert Cowham | Add functionality to allow depot paths to be specified in groups | ||
#1 | 23074 | Robert Cowham | Sample Yaml config file |