@Override public String getFullDisplayName() { return run.getFullDisplayName(); }
@Override public void run() { build.addAction(new RunningContextsAction()); FlowExecution execution = build.getExecution(); if (execution != null) { execution.addListener(listener); } else { LOGGER.log(SEVERE, "could not get flow-execution for build " + build.getFullDisplayName()); } } },
if (downstreamPipeline == null || downstreamPipeline.getLastBuild() == null) { LOGGER.log(Level.FINE, "Downstream pipeline {0} or downstream pipeline last build not found from upstream build {1}. Database synchronization issue or security restriction?", new Object[]{downstreamPipelineFullName, upstreamBuild.getFullDisplayName(), Jenkins.getAuthentication()}); continue; new Object[]{downstreamPipeline.isDisabled(), downstreamPipeline.isHoldOffBuildUntilSave(), downstreamPipeline.getFullName(), upstreamBuild.getFullDisplayName()}); continue; LOGGER.log(Level.FINE, "Skip triggering of downstream pipeline {0} from upstream build {1}: dependency trigger not configured", new Object[]{downstreamPipeline.getFullName(), upstreamBuild.getFullDisplayName()}); continue; new Object[]{downstreamPipeline.getFullName(), upstreamBuild.getFullDisplayName(), downstreamVisibleByUpstreamBuildAuth, upstreamVisibleByDownstreamBuildAuth});
@Issue("JENKINS-45455") @Test public void notPresentStageName() throws Exception { WorkflowRun original = expect(Result.FAILURE, "restart", "simpleRestart") .logContains("Odd numbered build, failing", "This shouldn't show up on second run") .go(); RestartDeclarativePipelineAction action = original.getAction(RestartDeclarativePipelineAction.class); assertNotNull(action); assertTrue(action.isRestartEnabled()); Exception runFailure = null; try { Queue.Item queueItem = action.run("not-present"); // Because we should definitely have thrown an exception in run. assertNull(queueItem); } catch (Exception e) { runFailure = e; } assertNotNull(runFailure); assertTrue(runFailure instanceof IllegalStateException); assertEquals(Messages.RestartDeclarativePipelineAction_StageNameNotPresent("not-present", original.getFullDisplayName()), runFailure.getMessage()); }
assertEquals(Messages.RestartDeclarativePipelineAction_OriginRunIncomplete(b.getFullDisplayName()), runFailure.getMessage());