use of com.thoughtworks.go.domain.Pipeline in project gocd by gocd.
the class PipelineWithRunOnAllJob method latestPipelineWithIdentifiers.
private Pipeline latestPipelineWithIdentifiers() {
Pipeline pipeline;
pipeline = dbHelper.getPipelineDao().mostRecentPipeline(pipelineName);
//TODO: #2318 - pipeline loaded from DB should contain identifiers
for (Stage stage : pipeline.getStages()) {
stage.setIdentifier(new StageIdentifier(pipeline, stage));
for (JobInstance jobInstance : stage.getJobInstances()) {
jobInstance.setIdentifier(new JobIdentifier(pipeline, stage, jobInstance));
}
}
return pipeline;
}
use of com.thoughtworks.go.domain.Pipeline in project gocd by gocd.
the class PipelineWithTwoStages method latestPipelineWithIdentifiers.
private Pipeline latestPipelineWithIdentifiers() {
Pipeline pipeline;
pipeline = dbHelper.getPipelineDao().mostRecentPipeline(pipelineName);
//TODO: #2318 - pipeline loaded from DB should contain identifiers
for (Stage stage : pipeline.getStages()) {
stage.setIdentifier(new StageIdentifier(pipeline, stage));
for (JobInstance jobInstance : stage.getJobInstances()) {
jobInstance.setIdentifier(new JobIdentifier(pipeline, stage, jobInstance));
}
}
return pipeline;
}
use of com.thoughtworks.go.domain.Pipeline in project gocd by gocd.
the class GoPropertiesTestTest method shouldGeneratePropertiesAfterBuildCompleted.
@Test
public void shouldGeneratePropertiesAfterBuildCompleted() throws Exception {
Pipeline newPipeline = fixture.createPipelineWithFirstStageAssigned(AGENT_UUID);
JobInstance job = completeStageAndTrigger(newPipeline.getFirstStage());
assertCommonBuildProperties(newPipeline, job);
assertThat(propertyDao.value(job.getId(), GoConstants.CRUISE_AGENT), is(HOSTNAME));
}
use of com.thoughtworks.go.domain.Pipeline in project gocd by gocd.
the class RestfulServiceTest method canSupportQueryingUsingPipelineNameWithDifferentCase.
@Test
public void canSupportQueryingUsingPipelineNameWithDifferentCase() throws Exception {
Pipeline pipeline = fixture.createdPipelineWithAllStagesPassed();
JobIdentifier jobIdentifier = restfulService.findJob(pipeline.getName().toUpperCase(), JobIdentifier.LATEST, fixture.devStage, "", PipelineWithTwoStages.JOB_FOR_DEV_STAGE);
assertThat(jobIdentifier.getPipelineName(), is(pipeline.getName()));
}
use of com.thoughtworks.go.domain.Pipeline in project gocd by gocd.
the class RestfulServiceTest method shouldShouldTranslateLatestPipelineLabel.
@Test
public void shouldShouldTranslateLatestPipelineLabel() throws Exception {
fixture.createdPipelineWithAllStagesPassed();
Pipeline latestPipleine = fixture.createdPipelineWithAllStagesPassed();
final JobIdentifier jobIdentifier1 = new JobIdentifier(latestPipleine.getName(), JobIdentifier.LATEST, fixture.devStage, JobIdentifier.LATEST, PipelineWithTwoStages.JOB_FOR_DEV_STAGE);
JobIdentifier jobIdentifier = restfulService.findJob(jobIdentifier1.getPipelineName(), jobIdentifier1.getPipelineLabel(), jobIdentifier1.getStageName(), jobIdentifier1.getStageCounter(), jobIdentifier1.getBuildName());
assertThat(jobIdentifier.getPipelineLabel(), is(latestPipleine.getLabel()));
}
Aggregations