Quantcast

P4TICKET variable use with Jenkins

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

P4TICKET variable use with Jenkins

Raj-4
Hi,

I dont want to set the P4PASSWD in jobs instead i want to P4TICKET variable which is set to $HOME/.p4tickets should be used all the time. So i provide only USERNAME/PORT in job configuration.

But i am getting error such as below; (Jenkins is setup in windows)
Started by user anonymous
Building in workspace C:\Tools\jenkins1.484\workspace\rajesh
Using master perforce client: 
[rajesh] $ p4 workspace -o 
[rajesh] $ p4 login -p
[rajesh] $ /usr/bin/p4 login -p
Caught exception communicating with perforce. Login attempt failed: Password invalid.com.tek42.perforce.PerforceException: Login attempt failed: Password invalid.
	at com.tek42.perforce.parse.AbstractPerforceTemplate.p4Login(AbstractPerforceTemplate.java:615)
	at com.tek42.perforce.parse.AbstractPerforceTemplate.login(AbstractPerforceTemplate.java:556)
	at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:372)
	at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:292)
	at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61)
	at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1461)
	at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1422)
	at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:793)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
	at hudson.model.Run.execute(Run.java:1502)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:236)
ERROR: Unable to communicate with perforce. Login attempt failed: Password invalid.
Finished: FAILURE

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P4TICKET variable use with Jenkins

Rob Petti-2
P4TICKET is interpreted by p4 as the actual value of the ticket (which is a hex string). The variable you are looking for is called "P4TICKETS".

On Friday, 5 October 2012 01:22:33 UTC-6, Raj wrote:
Hi,

I dont want to set the P4PASSWD in jobs instead i want to P4TICKET variable which is set to $HOME/.p4tickets should be used all the time. So i provide only USERNAME/PORT in job configuration.

But i am getting error such as below; (Jenkins is setup in windows)
Started by user anonymous
Building in workspace C:\Tools\jenkins1.484\workspace\rajesh
Using master perforce client: 
[rajesh] $ p4 workspace -o 
[rajesh] $ p4 login -p
[rajesh] $ /usr/bin/p4 login -p
Caught exception communicating with perforce. Login attempt failed: Password invalid.com.tek42.perforce.PerforceException: Login attempt failed: Password invalid.
	at com.tek42.perforce.parse.AbstractPerforceTemplate.p4Login(AbstractPerforceTemplate.java:615)
	at com.tek42.perforce.parse.AbstractPerforceTemplate.login(AbstractPerforceTemplate.java:556)
	at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:372)
	at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:292)
	at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61)
	at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1461)
	at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1422)
	at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:793)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
	at hudson.model.Run.execute(Run.java:1502)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:236)
ERROR: Unable to communicate with perforce. Login attempt failed: Password invalid.
Finished: FAILURE

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P4TICKET variable use with Jenkins

Richard Otter-2
In reply to this post by Raj-4
My understanding is that P4TICKET doesn't point to a file, but instead, is defined as the ticket value itself, a 32 char hex string. No?
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: P4TICKET variable use with Jenkins

Rob Petti-2
Exactly. P4TICKETS is the variable that should be set to the location
of the ticket file, not P4TICKET.

http://www.perforce.com/perforce/r12.1/manuals/cmdref/env.P4TICKETS.html

On Fri, Oct 5, 2012 at 2:12 PM, Richard J <[hidden email]> wrote:
> My understanding is that P4TICKET doesn't point to a file, but instead, is
> defined as the ticket value itself, a 32 char hex string. No?
>
Loading...