[JIRA] (JENKINS-54697) How to use 'p4 print' with P4Groovy?

10 views
Skip to first unread message

kwirth@perforce.com (JIRA)

unread,
Nov 19, 2018, 7:10:02 AM11/19/18
to jenkinsc...@googlegroups.com
Karl Wirth created an issue
 
Jenkins / Improvement JENKINS-54697
How to use 'p4 print' with P4Groovy?
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: p4-plugin
Created: 2018-11-19 12:09
Environment: Jenkins 2.138.1
P4Plugin 1.9.3
Labels: P4_VERIFY
Priority: Minor Minor
Reporter: Karl Wirth

When I try to use 'p4 print' inside P4Groovy (p4-plugin) I get the error:

ERROR: P4: Task Exception: com.perforce.p4java.exception.ConnectionException: Null output stream in writeText state map

Is this a bug or am I using it wrong?

Example code:

pipeline {
  agent { label 'master' }
  stages {
    stage("Repro") {
      steps {
        script {
	   def p4 = p4(credential: 'JenkinsMaster', workspace: manualSpec(charset: 'none', cleanup: false, name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, spec: clientSpec(allwrite: false, backup: true, changeView: '', clobber: true, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE', view: '//depot/Project1/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...')))
	   def myClient = p4.fetch('client', env.P4_CLIENT)
	   println ("Stream is: " + myClient.get("Stream") )
	   
        p4.run('print', '-q', '//depot/Project1/VERSION')
        // def version = p4.run('print', '-q', '//depot/Project1/VERSION')
        //echo "version: ${version}"
        }
      }
    }
  }
}
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

kwirth@perforce.com (JIRA)

unread,
Nov 29, 2018, 5:21:02 AM11/29/18
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
Change By: Karl Wirth
Labels: P4_VERIFY

kwirth@perforce.com (JIRA)

unread,
Nov 29, 2018, 5:21:02 AM11/29/18
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Dec 10, 2018, 7:05:01 AM12/10/18
to jenkinsc...@googlegroups.com
Karl Wirth commented on Improvement JENKINS-54697
 
Re: How to use 'p4 print' with P4Groovy?

No workaround found. Assigning to dev.

kwirth@perforce.com (JIRA)

unread,
Dec 10, 2018, 7:07:02 AM12/10/18
to jenkinsc...@googlegroups.com
Karl Wirth assigned an issue to Matthew Smeeth
 
Change By: Karl Wirth
Assignee: Matthew Smeeth

kwirth@perforce.com (JIRA)

unread,
Dec 10, 2018, 7:07:02 AM12/10/18
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
Change By: Karl Wirth
Labels: P4_VERIFY P4_B

andresreih@hotmail.com (JIRA)

unread,
May 31, 2019, 5:38:03 AM5/31/19
to jenkinsc...@googlegroups.com
andre sreih commented on Improvement JENKINS-54697
 
Re: How to use 'p4 print' with P4Groovy?

Hello,

Is there any updates on this matter ? how can we resolve this issue ?

andresreih@hotmail.com (JIRA)

unread,
May 31, 2019, 8:41:02 AM5/31/19
to jenkinsc...@googlegroups.com

Hello,

Putting the second argument as an array fixed the problem (-q and your path to the file)

andresreih@hotmail.com (JIRA)

unread,
May 31, 2019, 11:06:02 AM5/31/19
to jenkinsc...@googlegroups.com
andre sreih updated an issue
 
Change By: andre sreih
Comment:
Hello,

Is there any updates on this matter ? how can we resolve this issue ?

andresreih@hotmail.com (JIRA)

unread,
May 31, 2019, 11:06:02 AM5/31/19
to jenkinsc...@googlegroups.com
andre sreih updated an issue
Change By: andre sreih
Comment: Hello,

Putting the second argument as an array fixed the problem (-q and your path to the file)

pallen@perforce.com (JIRA)

unread,
Jun 4, 2019, 9:34:01 AM6/4/19
to jenkinsc...@googlegroups.com
Paul Allen updated an issue
Change By: Paul Allen
Labels: P4_B P4_C
Reply all
Reply to author
Forward
0 new messages