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}" } } } } }
No workaround found. Assigning to dev.