<BUG>GitStep step = new GitStep(sampleRepo.toString());step.setCredentialsId("nonexistent"); // TODO work around NPE pending https://github.com/jenkinsci/git-plugin/pull/467p.setDefinition(new CpsScmFlowDefinition(step.createSCM(), "Jenkinsfile"));</BUG><CONTEXT>sampleRepo.write("Jenkinsfile", "echo \"said ${readTrusted 'message'}\"");sampleRepo.write("message", "how do you do");sampleRepo.git("add", "Jenkinsfile", "message");sampleRepo.git("commit", "--all", "--message=defined");WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");<extra_id_0>WorkflowRun b = r.assertBuildStatusSuccess(p.scheduleBuild2(0));</CONTEXT>
p.setDefinition(new CpsScmFlowDefinition(new GitStep(sampleRepo.toString()).createSCM(), "Jenkinsfile"));