use of com.thoughtworks.go.domain.NullStage in project gocd by gocd.
the class FetchTaskTest method pipeline.
private Pipeline pipeline(String label) {
Pipeline pipeline = createPipeline("cruise", new NullStage("Stage"));
pipeline.setLabel(label);
return pipeline;
}
use of com.thoughtworks.go.domain.NullStage in project gocd by gocd.
the class UnrunStagesPopulatorTest method assertUnrunPipeline.
private void assertUnrunPipeline(Node node, String pipelineName) {
assertThat(node.revisions(), hasSize(1));
PipelineRevision empty_p2_revision = (PipelineRevision) node.revisions().get(0);
assertThat(empty_p2_revision.getPipelineIdentifier(), is(new UnrunPipelineRevision(pipelineName).getPipelineIdentifier()));
assertThat(empty_p2_revision.getStages(), is(new Stages(new NullStage("s1"), new NullStage("s2"), new NullStage("s3"), new NullStage("s4"))));
}
use of com.thoughtworks.go.domain.NullStage in project gocd by gocd.
the class CcTrayStageStatusChangeHandlerTest method shouldNotUpdateCacheWhenStageWhichHasChangedIsANullStage.
@Test
public void shouldNotUpdateCacheWhenStageWhichHasChangedIsANullStage() throws Exception {
handler.call(new NullStage("some-name"));
verifyZeroInteractions(cache);
verifyZeroInteractions(breakersCalculator);
verifyZeroInteractions(jobStatusChangeHandler);
}
use of com.thoughtworks.go.domain.NullStage in project gocd by gocd.
the class UnrunStagesPopulator method populateConfiguredStages.
private void populateConfiguredStages(Node node, PipelineConfig pipelineConfig) {
UnrunPipelineRevision unrunPipelineRevision = new UnrunPipelineRevision(node.getName());
for (StageConfig stageConfig : pipelineConfig) {
unrunPipelineRevision.addStage(new NullStage(stageConfig.name().toString()));
}
node.addRevision(unrunPipelineRevision);
}
use of com.thoughtworks.go.domain.NullStage in project gocd by gocd.
the class UnrunStagesPopulator method appendUnrunStages.
private void appendUnrunStages(PipelineConfig pipelineConfig, PipelineRevision pipelineRevision) {
Stages stages = pipelineRevision.getStages();
StageConfig nextStage = pipelineConfig.nextStage(new CaseInsensitiveString(stages.last().getName()));
while (nextStage != null && !stages.hasStage(nextStage.name().toString())) {
pipelineRevision.addStage(new NullStage(nextStage.name().toString()));
nextStage = pipelineConfig.nextStage(nextStage.name());
}
}
Aggregations