Issue Type: Improvement Improvement
Affects Versions: current
Assignee: Unassigned
Components: perforce
Created: 05/Sep/12 7:03 PM
Description:

Steps to Reproduce:
1. Click "Manage Jenkins" -> Global Properties
2. Create an Environment Variable as follows: name: P4USER value: p4service (or another P4 Username)
3. Select an Existing Job that uses Perforce for Source Code Management
4. Select the Username field and enter "${P4USER}"

Result:

Result: build fails as follows:
Started by user Administrator
Building in workspace /usr/share/tomcat6/.jenkins/jobs/dpapi-int/workspace
Using master perforce client: jenkins-dpapi-int
[workspace] $ /usr/local/bin/p4 workspace -o jenkins-dpapi-int
Caught exception communicating with perforce. Access for user 'com.tek42.perforce.PerforceException: Access for user '
	at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:382)
	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. Access for user '
Sending e-mails to: eng-...@netshelter.com
Finished: FAILURE

As you can see by the above: "Caught exception communicating with perforce. Access for user 'com.tek42.perforce.PerforceException: Access for user '"


Use Case:
If a user wishes to use exactly one user for all Jobs that use Perforce for SCM, he could enter this user in the Global Properties and then change the credentials user to poll Perforce at any time across all Jobs.

Environment: Jenkins Version: 1.480
Perforce Plugin: 1.3.17
OS: Amazon Linux 2012.03
Project: Jenkins
Labels: perforce
Priority: Minor Minor
Reporter: Colin Johnson
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to