[JIRA] (JENKINS-58745) P4Groovy p4.run() does not locate credentials in folder

8 views
Skip to first unread message

j.f.brown@sbcglobal.net (JIRA)

unread,
Jul 31, 2019, 6:44:02 PM7/31/19
to jenkinsc...@googlegroups.com
Joel Brown created an issue
 
Jenkins / Improvement JENKINS-58745
P4Groovy p4.run() does not locate credentials in folder
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: p4-plugin
Created: 2019-07-31 22:43
Labels: P4_VERIFY
Priority: Major Major
Reporter: Joel Brown

When credentials to use are in a folder, using them in a script with p4.run() will not find the credential.

Repro:

create a folder.

within the folder, create a credential and a pipleline job.

The job's script references the credential in the folder.

{{ script{}}
{{ def ws = [$class: 'ManualWorkspaceImpl', name: "jenkins-${NODE_NAME}-${JOB_NAME}", }}
{{ spec: [view: "//depot/main/utilities/AppUtilities/src/... //jenkins-${NODE_NAME}-${JOB_NAME}/..."]]}}
{{ def p4 = p4(credential: 'build-u18-20182', workspace: ws)}}
{{ def output = p4.run('sync')}}
{{ }}}

------------------------

console log:
[Pipeline] Start of Pipeline[Pipeline] nodeRunning on Jenkins in /var/lib/jenkins/jobs/pipelines/jobs/simple sync/workspace[Pipeline] {[Pipeline] script[Pipeline]

{[Pipeline] p4[Pipeline] }

[Pipeline] // script[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: P4: Task Exception: Invalid credentials
Finished: FAILURE

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

j.f.brown@sbcglobal.net (JIRA)

unread,
Jul 31, 2019, 6:49:02 PM7/31/19
to jenkinsc...@googlegroups.com
Joel Brown updated an issue
Change By: Joel Brown
When credentials to use are in a folder, using them in a script with p4.run() will not find the credential.

Repro:

create a folder.

within the folder, create a credential and a pipleline job.

The job's script references the credential in the folder.

{
\ { script{}}
\ {{ def ws = [$class: 'ManualWorkspaceImpl', name: "jenkins-${NODE_NAME}-${JOB_NAME}", }}
{{ spec: [view: "//depot/main/utilities/AppUtilities/src/... //jenkins-${NODE_NAME}-${JOB_NAME}/..."]]}}
\ {{ def p4 = p4(credential: 'build-u18-20182', workspace: ws)}}
\ {{ def output = p4.run('sync')}}
\ {{ }}}

 

A p4sync step using the same credential succeeds.

------------------------

console log:
[Pipeline] Start of Pipeline[Pipeline] nodeRunning on [Jenkins|http://jbrown-swarmu18.das.perforce.com:8080/computer/(master)/] in /var/lib/jenkins/jobs/pipelines/jobs/simple sync/workspace[Pipeline] {[Pipeline] script[Pipeline]


{[Pipeline] p4[Pipeline] }

[Pipeline] // script[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: P4: Task Exception: Invalid credentials
Finished: FAILURE

j.f.brown@sbcglobal.net (JIRA)

unread,
Aug 8, 2019, 6:16:02 PM8/8/19
to jenkinsc...@googlegroups.com

j.f.brown@sbcglobal.net (JIRA)

unread,
Aug 18, 2019, 10:18:01 PM8/18/19
to jenkinsc...@googlegroups.com
Joel Brown updated an issue
Change By: Joel Brown
Issue Type: Improvement Bug

pallen@perforce.com (JIRA)

unread,
Sep 30, 2019, 7:05:02 AM9/30/19
to jenkinsc...@googlegroups.com
Paul Allen started work on Bug JENKINS-58745
 
Change By: Paul Allen
Status: Open In Progress
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

pallen@perforce.com (JIRA)

unread,
Sep 30, 2019, 7:05:03 AM9/30/19
to jenkinsc...@googlegroups.com
Paul Allen updated Bug JENKINS-58745
 

Ready for release.

Change By: Paul Allen
Status: In Progress Fixed but Unreleased
Resolution: Fixed

pallen@perforce.com (JIRA)

unread,
Oct 2, 2019, 10:54:05 AM10/2/19
to jenkinsc...@googlegroups.com
 

Released in 1.10.4

Change By: Paul Allen
Status: Fixed but Unreleased Closed
Reply all
Reply to author
Forward
0 new messages