Thanks very much for your work on the p4 plugin! It has helped thousdansds 
of individuals,
 
OK. It's a work in progress.  It's just that I spent several hours figuring 
out the polling and validation limitations
 
This may also be related to the use of the EnvInject global password.
This is in a non-polling job, so I have variable substituion for the 
password and in th emapping.
 
Take a look at this job log output:
 
*14:23:41*  [EnvInject] - Inject global passwords.
*14:23:41*  Started by user *Richard 
Otter*<http://ptjenkins.global.bio-rad.com/user/rotter>
*14:23:41*  [EnvInject] - Loading node environment variables.
*14:23:41*  [EnvInject] - Preparing an environment for the build.
*14:23:41*  [EnvInject] - Keeping Jenkins system variables.
*14:23:41*  [EnvInject] - Keeping Jenkins build variables.
*14:23:41*  [EnvInject] - Adding build parameters as variables.
*14:23:41*  [EnvInject] - Injecting as environment variables the properties 
content 
*14:23:41*  BranchName=Main
*14:23:41*  DepotBranch=//depot/Projects/NGC/Main
*14:23:41*  
*14:23:41*  [EnvInject] - Variables injected successfully.
*14:23:41*  [EnvInject] - Injecting contributions.
*14:23:41*  Building remotely on 
*PT-Build-05*<http://ptjenkins.global.bio-rad.com/computer/PT-Build-05>in 
workspace c:\Jenkins\workspace\NGC_VerDeploy
*14:23:41*  Using remote perforce client: Jenkins-NGC_VerDeploy-1848380301
*14:23:41*  [NGC_VerDeploy] $ p4 workspace -o 
Jenkins-NGC_VerDeploy-1848380301
*14:23:41*  [NGC_VerDeploy] $ p4 login -p
*14:23:41*  [NGC_VerDeploy] $ p4 -P C93CD4BFE0565DB3D05107EEDF54A37F 
workspace -o Jenkins-NGC_VerDeploy-1848380301
*14:23:41*  Last build changeset: 74862
*14:23:41*  [NGC_VerDeploy] $ p4 -P C93CD4BFE0565DB3D05107EEDF54A37F 
changes -s submitted -m 1 //...
*14:23:41*  [NGC_VerDeploy] $ p4 -P C93CD4BFE0565DB3D05107EEDF54A37F -s 
changes -s submitted //Jenkins-NGC_VerDeploy-1848380301/...@74863,@74865
*14:23:41*  [NGC_VerDeploy] $ p4 -P C93CD4BFE0565DB3D05107EEDF54A37F 
describe -s 74865
*14:23:41*  [NGC_VerDeploy] $ p4 login -p
*14:23:41*  [NGC_VerDeploy] $ p4 -P C93CD4BFE0565DB3D05107EEDF54A37F -P 
C93CD4BFE0565DB3D05107EEDF54A37F describe -s 74865
*14:23:41*  Caught exception communicating with perforce. Password not 
allowed at this server security level, use 'p4 
login'com.tek42.perforce.PerforceException: Password not allowed at this 
server security level, use 'p4 login'
*14:23:41*  at 
com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:382)
*14:23:41*  at 
com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:292)
*14:23:41*  at 
com.tek42.perforce.parse.Changes.getChangelist(Changes.java:71)
*14:23:41*  at 
com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:433)
*14:23:41*  at 
hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:924)
*14:23:41*  at 
hudson.model.AbstractProject.checkout(AbstractProject.java:1226)
*14:23:41*  at 
hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:586)
*14:23:41*  at 
hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
*14:23:41*  at hudson.model.Run.run(Run.java:1438)
*14:23:41*  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
*14:23:41*  at 
hudson.model.ResourceController.execute(ResourceController.java:88)
*14:23:41*  at hudson.model.Executor.run(Executor.java:239)
*14:23:41*  ERROR: Unable to communicate with perforce. Password not 
allowed at this server security level, use 'p4 login'
*14:23:41*  Archiving artifacts
Notice that at line 17 the plugin does a login and then successfully uses 
the ticket in the next several commands, but then does
another login and issues the command-
*14:23:41* [NGC_VerDeploy] $ p4 -P C93CD4BFE0565DB3D05107EEDF54A37F -P 
C93CD4BFE0565DB3D05107EEDF54A37F describe -s 74865
 
Two -P parameters! I got the security level error.
I'm using 1.3.17 P4plugin with server 1.466.1 on Windows x64
 

On Tuesday, August 28, 2012 1:52:07 PM UTC-7, Rob Petti wrote:

> Both validation and polling do not get full environments, which is why 
> they aren't being replaced. This means you can't use EnvInject for 
> that. I've been struggling with finding ways of fixing it, but as near 
> as I can tell, most plugins only support build parameters such as 
> those provided globally by jenkins or the masked passwords plugin. 
>
> On Tue, Aug 28, 2012 at 2:42 PM, Richard J <rj...@columbia.edu<javascript:>> 
> wrote: 
> > 
> > 
> > Well- almost confirmed.... 
> > 
> > When I set an EnvInject global password for my P4 password, I can use it 
> in 
> > the perforce password entry field to successfully run jobs. That’s what 
> I 
> > originally confirmed. 
> > 
> > However, I have now seen two new problems- 
> > 
> > 
> > 
> > ·         The job cannot use the global password to poll the depot for 
> > changes. I get an invalid password message in the log (see below) 
> > 
> > ·         The job configuration UI shows messages that indicate variable 
> > substitution is not performed. 
> > 
> > The first is a showstopper for CI jobs. 
> > 
> > The second I can live with, but I’d suggest that the warning include a 
> > disclaimer that says substitution is not done in the configuration 
> screen. 
> > 
> > 
> > 
> > 
> > 
> > Similarly, when I tried to use a variable in the perforce mapping, the 
> same 
> > kinds of problems were apparent: 
> > 
> > Polling does not work (see log entry below) 
> > 
> > The job configuration UI shows messages that indicate variable 
> substitution 
> > was not performed. 
> > 
> > 
> > 
> > 
> > 
> > Polling log contents: 
> > 
> > The polling log when using variable substitution in the password field - 
> > 
> > 
> > 
> > Started on Aug 28, 2012 12:58:51 PM 
> > 
> > Looking for changes... 
> > 
> > Using master 
> > 
> > Using master perforce client: Jenkins-NGC_CI 
> > 
> > Caught Exception communicating with perforce.Login attempt failed: 
> Password 
> > invalid. 
> > 
> > FATAL: Unable to communicate with perforce.  Check log file for: Login 
> > attempt failed: Password invalid. 
> > 
> > java.io.IOException: Unable to communicate with perforce.  Check log 
> file 
> > for: Login attempt failed: Password invalid. 
> > 
> >         at 
> > 
> hudson.plugins.perforce.PerforceSCM.compareRemoteRevisionWith(PerforceSCM.java:1169)
>  
>
> > 
> >         at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356) 
> > 
> >         at hudson.scm.SCM.poll(SCM.java:373) 
> > 
> >         at hudson.model.AbstractProject.poll(AbstractProject.java:1354) 
> > 
> >         at 
> hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) 
> > 
> >         at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) 
> > 
> >         at 
> > 
> hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
>  
>
> > 
> >         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown 
> > Source) 
> > 
> >         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 
> > 
> >         at java.util.concurrent.FutureTask.run(Unknown Source) 
> > 
> >         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
> > Source) 
> > 
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
> > Source) 
> > 
> >         at java.lang.Thread.run(Unknown Source) 
> > 
> > Done. Took 0.44 sec 
> > 
> > No changes 
> > 
> > 
> > 
> > 
> > 
> > The polling log when using variable substitution in client mapping (view 
> map 
> > field)- 
> > 
> > 
> > 
> > Started on Aug 28, 2012 12:51:51 PM 
> > 
> > Looking for changes... 
> > 
> > Using master 
> > 
> > Using master perforce client: Jenkins-NGC_CI 
> > 
> > Warning: Client Spec line invalid, ignoring. (${DepotBranch}/Source/... 
> > //jenkins/ReadOnly/Source/... 
> > 
> > ) 
> > 
> > Changing P4 Client View from: 
> > 
> > //depot/Projects/NGC/Main/Source/... 
> //Jenkins-NGC_CI/ReadOnly/Source/... 
> > 
> > 
> > 
> > Changing P4 Client View to: 
> > 
> > Saving modified client Jenkins-NGC_CI 
> > 
> > No changes found. 
> > 
> > Done. Took 2.2 sec 
> > 
> > No changes 
> > 
> > 
> > 
> > The job configuration UI showed the following message: 
> > 
> > ·         when using variable substitution in the password field - 
> > 
> > Unable to check workspace against depot 
> > 
> > 
> > 
> > 
> > 
> > ·         When using variable substitution in client mapping (view map 
> > field)- 
> > 
> > Invalid mapping:${DepotBranch}/Source/... //jenkins/ReadOnly/Source/... 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Monday, August 27, 2012 9:55:48 AM UTC-7, Richard J wrote: 
> >> 
> >> Confirmed- Both EnvInject and MaskPassword global passwords work as 
> >> advertised in Perforce plugin. 
> >> NOTE: Don't forget to mark the checkbox in the job config to allow use 
> of 
> >> the defined global passwords in that job! 
> >> 
> >> 
> >> On Saturday, August 25, 2012 4:18:00 PM UTC-7, Rob Petti wrote: 
> >>> 
> >>> If it doesn't work already (it should) then you can use the Mask 
> >>> Passwords plugin to set up a global password instead. 
> >>> 
> >>> On Friday, 24 August 2012 13:22:18 UTC-6, Richard J wrote: 
> >>>> 
> >>>> The newer versions of the plugin EnvInject can create a 
> GlobalPassword. 
> >>>> Since I have the same Perforce password entered separately in about 
> 100 
> >>>> jobs, it would be nice 
> >>>> to use this feature. 
> >>>> Any plans to support it in the Perforce plugin? 
> >>>> 
> >>>> 
>

Reply via email to