@Override public void evaluate() throws Throwable { WorkflowJob p = story.j.jenkins.getItemByFullName("p/dev%2Fmain", WorkflowJob.class); assertNotNull(p); sampleRepo.git("commit", "--all", "--message=Flow"); sampleRepo.notifyCommit(story.j); WorkflowRun b2 = p.getLastBuild(); assertEquals(2, b2.getNumber()); story.j.assertLogContains("Branch=dev/main", b2); story.j.assertLogContains("workspace=dev_main", b2); verifyProject(p); } });
private void round3() throws Exception { sampleRepo.git("checkout", "master"); sampleRepo.write("Jenkinsfile", "// yet more"); sampleRepo.git("commit", "--all", "--message=master-3"); sampleRepo.git("checkout", "newfeature"); sampleRepo.write("Jenkinsfile", "// yet more"); sampleRepo.git("commit", "--all", "--message=newfeature-3"); sampleRepo.git("checkout", "release"); sampleRepo.write("Jenkinsfile", "// yet more"); sampleRepo.git("commit", "--all", "--message=release-3"); sampleRepo.notifyCommit(r); }
private void round2() throws Exception { sampleRepo.git("checkout", "master"); sampleRepo.write("Jenkinsfile", "// more"); sampleRepo.git("commit", "--all", "--message=master-2"); sampleRepo.git("checkout", "newfeature"); sampleRepo.write("Jenkinsfile", "// more"); sampleRepo.git("commit", "--all", "--message=newfeature-2"); sampleRepo.git("checkout", "release"); sampleRepo.write("Jenkinsfile", "// more"); sampleRepo.git("commit", "--all", "--message=release-2"); sampleRepo.notifyCommit(r); }
sampleRepo.git("add", "flow.groovy"); sampleRepo.git("commit", "--message=next"); sampleRepo.notifyCommit(r); b = p.getLastBuild(); assertEquals(2, b.number);
sampleGitRepo.git("commit", "--all", "--message=tweaked"); SemaphoreStep.success("wait/1", null); sampleGitRepo.notifyCommit(r); WorkflowRun b2 = p.getLastBuild(); assertEquals(2, b2.getNumber());
sampleRepo.notifyCommit(r); sampleRepo.notifyCommit(r); WorkflowMultiBranchProjectTest.showIndexing(p); assertEquals(4, master.getNextBuildNumber());
"echo \"enabled? ${params.flag}\""); sampleRepo.git("commit", "--all", "--message=flow"); sampleRepo.notifyCommit(r); WorkflowRun b3 = p.getLastBuild(); assertEquals(3, b3.getNumber()); "echo \"value ${params.select}\""); sampleRepo.git("commit", "--all", "--message=flow"); sampleRepo.notifyCommit(r); WorkflowRun b6 = p.getLastBuild(); assertEquals(6, b6.getNumber()); "echo \"value ${params.select}\""); sampleRepo.git("commit", "--all", "--message=flow"); sampleRepo.notifyCommit(r); WorkflowRun b8 = p.getLastBuild(); assertEquals(8, b8.getNumber());
sampleRepo.git("add", "ignored-message"); sampleRepo.git("commit", "--all", "--message=less rude"); sampleRepo.notifyCommit(r); b = p.getLastBuild(); assertEquals(2, b.getNumber());