Search in sources :

Example 1 with TriggerOptions

use of com.thoughtworks.go.apiv1.pipelineoperations.representers.TriggerOptions in project gocd by gocd.

the class PipelineOperationsControllerV1Delegate method triggerOptions.

public String triggerOptions(Request request, Response response) throws IOException {
    String pipelineName = request.params("pipeline_name");
    EnvironmentVariablesConfig variables = goConfigService.variablesFor(pipelineName);
    PipelineInstanceModel pipelineInstanceModel = pipelineHistoryService.latest(pipelineName, currentUsername());
    TriggerOptions triggerOptions = new TriggerOptions(variables, pipelineInstanceModel);
    return writerForTopLevelObject(request, response, writer -> TriggerWithOptionsViewRepresenter.toJSON(writer, triggerOptions));
}
Also used : PipelineInstanceModel(com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel) TriggerOptions(com.thoughtworks.go.apiv1.pipelineoperations.representers.TriggerOptions) EnvironmentVariablesConfig(com.thoughtworks.go.config.EnvironmentVariablesConfig)

Aggregations

TriggerOptions (com.thoughtworks.go.apiv1.pipelineoperations.representers.TriggerOptions)1 EnvironmentVariablesConfig (com.thoughtworks.go.config.EnvironmentVariablesConfig)1 PipelineInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel)1