Package hudson.plugins.parameterizedtrigger

Examples of hudson.plugins.parameterizedtrigger.BlockingBehaviour


public class BuildTriggerConfigTest extends HudsonTestCase {

    private BlockableBuildTriggerConfig createConfig(String projectToTrigger){
        List<AbstractBuildParameters> buildParameters = new ArrayList<AbstractBuildParameters>();
        buildParameters.add(new CurrentBuildParameters());
        BlockingBehaviour neverFail = new BlockingBehaviour("never", "never", "never");
        return new BlockableBuildTriggerConfig(projectToTrigger, neverFail, buildParameters);
    }
View Full Code Here


   
    private TriggerBuilder createTriggerBuilder(AbstractProject project, NoFilesFoundEnum action, String encoding){

        TriggerBuilder tBuilder = new TriggerBuilder(
                                new BlockableBuildTriggerConfig(project.getName(),
                                new BlockingBehaviour(Result.FAILURE, Result.UNSTABLE, Result.FAILURE),
                                ImmutableList.<AbstractBuildParameterFactory>of(
                                    new FileBuildParameterFactory("*.txt", encoding, action)),
                                Collections.<AbstractBuildParameters>emptyList()));
        return tBuilder;
    }
View Full Code Here

        Project<?,?> projectA = createFreeStyleProject();
        Project projectB = createFreeStyleProject();
        projectA.getBuildersList().add(
                new TriggerBuilder(
                        new BlockableBuildTriggerConfig(projectB.getName(),
                                new BlockingBehaviour(Result.FAILURE, Result.UNSTABLE, Result.FAILURE),
                                ImmutableList.<AbstractBuildParameterFactory>of(new CounterBuildParameterFactory("0","1","1", "TEST=COUNT$COUNT")),
                                Collections.<AbstractBuildParameters>emptyList())));

        CaptureAllEnvironmentBuilder builder = new CaptureAllEnvironmentBuilder();
        projectB.getBuildersList().add(builder);
View Full Code Here

        Project<?,?> projectA = createFreeStyleProject();
        Project projectB = createFreeStyleProject();
        projectA.getBuildersList().add(
                new TriggerBuilder(
                        new BlockableBuildTriggerConfig(projectB.getName(),
                                new BlockingBehaviour(Result.FAILURE, Result.UNSTABLE, Result.FAILURE),
                                ImmutableList.<AbstractBuildParameterFactory>of(
                                        new CounterBuildParameterFactory("0","1","1", "TEST=COUNT$COUNT"),
                                        new CounterBuildParameterFactory("0","2","1", "NEWTEST=COUNT$COUNT")
                                        ),
                                Collections.<AbstractBuildParameters>emptyList())));
View Full Code Here

  public void test() throws Exception {
    Project<?, ?> projectA = createFreeStyleProject("projectA");
    List<AbstractBuildParameters> buildParameters = new ArrayList<AbstractBuildParameters>();
    buildParameters.add(new CurrentBuildParameters());
    BlockingBehaviour neverFail = new BlockingBehaviour("never", "never", "never");
    BlockableBuildTriggerConfig config = new BlockableBuildTriggerConfig("projectB", neverFail, buildParameters);
    projectA.getBuildersList().add(new TriggerBuilder(config));

    CaptureEnvironmentBuilder builder = new CaptureEnvironmentBuilder();
    projectA.getBuildersList().add(builder);
View Full Code Here

  public void test_oddchars() throws Exception {
    Project<?, ?> projectA = createFreeStyleProject("projectA");
    List<AbstractBuildParameters> buildParameters = new ArrayList<AbstractBuildParameters>();
    buildParameters.add(new CurrentBuildParameters());
    BlockingBehaviour neverFail = new BlockingBehaviour("never", "never", "never");

    String testName = "odd£()+}{-=~chars-10";
    String testNameResult = "odd_chars_10";
    BlockableBuildTriggerConfig config = new BlockableBuildTriggerConfig(testName, neverFail, buildParameters);
    projectA.getBuildersList().add(new TriggerBuilder(config));
View Full Code Here

    Project projectB = createFreeStyleProject(testNameResult);
    Project projectC = createFreeStyleProject(testNameResult2);
    projectA.getBuildersList().add(
            new TriggerBuilder(
            new BlockableBuildTriggerConfig(testNameResult + "," + testNameResult2,
            new BlockingBehaviour(Result.FAILURE, Result.UNSTABLE, Result.FAILURE),
            ImmutableList.<AbstractBuildParameterFactory>of(new CounterBuildParameterFactory("0", Integer.toString(buildsToTest - 1), "1", "TEST=COUNT$COUNT")),
            Collections.<AbstractBuildParameters>emptyList())));

    CaptureEnvironmentBuilder builder = new CaptureEnvironmentBuilder();
    projectA.getBuildersList().add(builder);
View Full Code Here

  public void testNonBlocking() throws Exception {
    Project<?, ?> projectA = createFreeStyleProject("projectA");
    List<AbstractBuildParameters> buildParameters = new ArrayList<AbstractBuildParameters>();
    buildParameters.add(new CurrentBuildParameters());
    BlockingBehaviour neverFail = new BlockingBehaviour("never", "never", "never");
    BlockableBuildTriggerConfig config = new BlockableBuildTriggerConfig("projectB", neverFail, buildParameters);

    BlockableBuildTriggerConfig nonBlockingConfig = new BlockableBuildTriggerConfig("projectC", null, buildParameters);
    projectA.getBuildersList().add(new TriggerBuilder(config, nonBlockingConfig));
View Full Code Here

      FreeStyleProject p2 = createFreeStyleProject();
     
      // Blocked build
      p1.getBuildersList().add(new TriggerBuilder(new BlockableBuildTriggerConfig(
              p2.getName(),
              new BlockingBehaviour(
                      Result.FAILURE,
                      Result.UNSTABLE,
                      Result.FAILURE
              ),
              Arrays.<AbstractBuildParameters>asList(
View Full Code Here

import jenkins.model.Jenkins;

public class TriggerBuilderTest extends HudsonTestCase {

    private BlockableBuildTriggerConfig createTriggerConfig(String projects) {
        return new BlockableBuildTriggerConfig(projects, new BlockingBehaviour("never", "never", "never"), null);
    }
View Full Code Here

TOP

Related Classes of hudson.plugins.parameterizedtrigger.BlockingBehaviour

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.