Search in sources :

Example 1 with ScheduleOptionsBuilder

use of com.thoughtworks.go.server.service.builders.ScheduleOptionsBuilder in project gocd by gocd.

the class PipelineTriggerService method schedule.

public void schedule(String pipelineName, PipelineScheduleOptions pipelineScheduleOptions, Username username, final HttpOperationResult result) {
    LOGGER.info("[Pipeline Schedule] [Requested] Manual trigger of pipeline '{}' requested by {}", pipelineName, CaseInsensitiveString.str(username.getUsername()));
    ScheduleOptions scheduleOptions = new ScheduleOptionsBuilder(goConfigService).build(result, pipelineName, pipelineScheduleOptions);
    if (result.canContinue()) {
        LOGGER.info("[Pipeline Schedule] [Accepted] Manual trigger of pipeline '{}' accepted for user {}", pipelineName, CaseInsensitiveString.str(username.getUsername()));
        buildCauseProducerService.manualSchedulePipeline(username, new CaseInsensitiveString(pipelineName), scheduleOptions, result);
        LOGGER.info("[Pipeline Schedule] [Processed] Manual trigger of pipeline '{}' processed with result '{}'", pipelineName, result.getServerHealthState());
    }
}
Also used : ScheduleOptions(com.thoughtworks.go.server.scheduling.ScheduleOptions) PipelineScheduleOptions(com.thoughtworks.go.server.domain.PipelineScheduleOptions) ScheduleOptionsBuilder(com.thoughtworks.go.server.service.builders.ScheduleOptionsBuilder) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString)

Aggregations

CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)1 PipelineScheduleOptions (com.thoughtworks.go.server.domain.PipelineScheduleOptions)1 ScheduleOptions (com.thoughtworks.go.server.scheduling.ScheduleOptions)1 ScheduleOptionsBuilder (com.thoughtworks.go.server.service.builders.ScheduleOptionsBuilder)1