Jump to content


Running p4 commands through trigger script

trigger python p4 process

  • Please log in to reply
3 replies to this topic

#1 akKix

akKix

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 02 April 2015 - 04:29 PM

Hi All,

I have setup a group of triggers that run on commit to validate certain changes in files. This requires me to run a p4 process on the server in order to get diffs of certain files.

I tested it locally and it works, however, when run the trigger through p4 it returns an error saying my session has timed out.

Is there a way to run this command without requiring a user? Our P4 passwords are managed through a separate system and I cannot pass the users PW through in order to run it as that user. Is there another option?

I would like to avoid putting any passwords in the script file if possible.

#2 akKix

akKix

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 02 April 2015 - 04:30 PM

Thanks in advance!

#3 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 02 April 2015 - 06:31 PM

Hi,

These are good questions that many others have asked also.  Yes, you can have your Perforce user that has an unlimited login that never times out.  We have a couple Knowledge Base articles with solutions to the questions that you had:

- Triggers and Passwords
http://answers.perfo...rticles/KB/2589

- Logging In to Perforce Non-interactively
http://answers.perfo...rticles/KB/3418

#4 phopkins

phopkins

    Advanced Member

  • Members
  • PipPipPip
  • 97 posts

Posted 06 April 2015 - 10:52 PM

Ticketed logins can help a lot with this.  If you have tickets you don't need to use passwords. Set the ticket to non expire for a service type user and you should be set to use that service user in your script forever.





Also tagged with one or more of these keywords: trigger, python, p4 process

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users