Duplication:
- Go to http://<jenkins>/computer/<node>/script
- Run:
import org.jenkinsci.plugins.p4.workspace.StreamWorkspaceImpl; import org.jenkinsci.plugins.p4.groovy.P4Groovy; def ws = new StreamWorkspaceImpl('none', false, '//Stream_Depot/Main', 'job1-temp-branch1') def p4 = new P4Groovy('bad credential', null, ws, new FilePath(new File('workspace'))) def result = p4.run('status')
- The error message returned is 'hudson.AbortException: P4: Task Exception: null'
This can also be duplicated by using a bad credential in a Jenkinsfile using the normal syntax:
def ws = [$class: 'StreamWorkspaceImpl', charset: 'none', format: env.JOB_NAME + '-temp-' + env.BRANCH_NAME, pinHost: false, streamName: '//Stream_Depot/' + env.BRANCH_NAME] def p4 = p4(credential: 'bad credential', workspace: ws) def result = p4.run('streams')
Expected result:
An error message stating that the credential is not found.