Search in sources :

Example 6 with NullBuilder

use of com.thoughtworks.go.domain.builder.NullBuilder in project gocd by gocd.

the class BuildWorkEnvironmentVariablesTest method createAssignment.

private BuildAssignment createAssignment(EnvironmentVariableContext environmentVariableContext) throws IOException {
    JobPlan plan = new DefaultJobPlan(new Resources(), new ArrayList<>(), -1, new JobIdentifier(PIPELINE_NAME, 1, "1", STAGE_NAME, "1", JOB_NAME, 123L), null, new EnvironmentVariables(), new EnvironmentVariables(), null, null);
    MaterialRevisions materialRevisions = materialRevisions();
    BuildCause buildCause = BuildCause.createWithModifications(materialRevisions, TRIGGERED_BY_USER);
    List<Builder> builders = new ArrayList<>();
    builders.add(new CommandBuilder("ant", "", dir, new RunIfConfigs(), new NullBuilder(), ""));
    return BuildAssignment.create(plan, buildCause, builders, dir, environmentVariableContext, new ArtifactStores());
}
Also used : ArtifactStores(com.thoughtworks.go.config.ArtifactStores) CommandBuilder(com.thoughtworks.go.domain.builder.CommandBuilder) Builder(com.thoughtworks.go.domain.builder.Builder) NullBuilder(com.thoughtworks.go.domain.builder.NullBuilder) ArrayList(java.util.ArrayList) NullBuilder(com.thoughtworks.go.domain.builder.NullBuilder) BuildCause(com.thoughtworks.go.domain.buildcause.BuildCause) CommandBuilder(com.thoughtworks.go.domain.builder.CommandBuilder)

Aggregations

Builder (com.thoughtworks.go.domain.builder.Builder)6 NullBuilder (com.thoughtworks.go.domain.builder.NullBuilder)6 CommandBuilder (com.thoughtworks.go.domain.builder.CommandBuilder)4 ArtifactStores (com.thoughtworks.go.config.ArtifactStores)3 BuildCause (com.thoughtworks.go.domain.buildcause.BuildCause)3 ArrayList (java.util.ArrayList)3 JobResult (com.thoughtworks.go.domain.JobResult)2 Materials (com.thoughtworks.go.config.materials.Materials)1 BuildLogElement (com.thoughtworks.go.domain.BuildLogElement)1 Modification (com.thoughtworks.go.domain.materials.Modification)1 Duration (java.time.Duration)1 Instant (java.time.Instant)1 Date (java.util.Date)1