Package hudson.matrix

Examples of hudson.matrix.Combination$BooleanCategory


    @Test
    public void should_run_parallel_build_of_the_combination_if_command_is_parallized() throws Exception {
        DockerImageBuildConfiguration dockerImageBuildConfiguration = new DockerImageBuildConfiguration(of("image", "ubutu",
                "command", of("one","echo one", "two","echo two")),"buildId",new ShellCommands());
        Assert.assertTrue(dockerImageBuildConfiguration.isParallized());
        ShellCommands shellCommands = dockerImageBuildConfiguration.toShellCommands(new Combination(of("command","two")));
        Assert.assertEquals("docker run --rm --sig-proxy=true ubutu sh -cx \"echo two\"",shellCommands.get(0));
    }
View Full Code Here


        super(Combination.class);
    }

    @Override
    public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) {
        return new Combination((Map<String, String>) fromDBObject);
    }
View Full Code Here

        dynamicBuild.setAxisList(getAxisList(buildConfiguration));
       Result result ;
        if(buildConfiguration.isParallized()){
            result = runMultiConfigbuildRunner(dynamicBuild, buildConfiguration, listener, launcher);;
        }else{
             result = runSingleConfigBuild(dynamicBuild, new Combination(ImmutableMap.of("script", "main")),buildConfiguration,buildExecutionContext,listener,launcher) ;
        }
        runPlugins(dynamicBuild, buildConfiguration.getPlugins(), listener, launcher);
        runNotifiers(dynamicBuild,buildConfiguration,listener);
        return result;
    }
View Full Code Here

            build.setAxisList(buildConfiguration.getAxisList());
            Result result ;
            if(buildConfiguration.isParallized()){
                result = runMultiConfigbuildRunner(build, buildConfiguration, listener, launcher);
            }else{
                result = runSubBuild(new Combination(ImmutableMap.of("script", "main")), buildExecutionContext, listener);
            }
            return result;

        }catch (InterruptedException e){
            if(buildConfiguration !=null && Iterables.isEmpty(buildConfiguration.getLinkCleanupCommands())){
View Full Code Here

    @Test
    public void should_not_install_language_packages_if_language_is_unknown() {
        ListOrSingleValue<String> packageValue = new ListOrSingleValue<String>("package1");
        PackagesSection packagesSection = new PackagesSection(packageValue, new LanguageSection(new StringValue("unknown")), new LanguageVersionsSection(new ListOrSingleValue<String>("version1")));
        String installPackagesScript = packagesSection.getInstallPackagesScript(new Combination(ImmutableMap.of("one", "two")));
        assertEquals("install_packages package1", installPackagesScript);
    }
View Full Code Here

public class VarsSectionTest {

    @Test
    public void should_export_environment_variables() {
        VarsSection varsSection = new VarsSection(new MapValue<String, String>(map("RBXOPT", "-X19", "JRUBY_OPTS", "--1.9")));
        ShellCommands script = varsSection.toScript(new Combination(map("script", "main")));
        assertTrue(script.toShellScript().contains("export RBXOPT=-X19"));
        assertTrue(script.toShellScript().contains("export JRUBY_OPTS=--1.9"));
    }
View Full Code Here

    @Test
    public void should_run_post_build() {
        ConfigSection afterRunSection = new AfterRunSection(configListOrSingleValue("spec integration1", "spec integration2"));

        Combination combination = new Combination(ImmutableMap.of("script", "post_build"));
        assertTrue(afterRunSection.toScript(combination).toShellScript().contains("spec integration1"));
    }
View Full Code Here

    @Test
    public void should_not_run_post_build_if_not_post_build() {
        ConfigSection afterRunSection = new AfterRunSection(configListOrSingleValue("spec integration1", "spec integration2"));

        Combination combination = new Combination(ImmutableMap.of("script", "main"));
        assertNull(afterRunSection.toScript(combination));
    }
View Full Code Here

                logger.log(Level.FINER, "Adding matrix combination data for {0}", project);
                MatrixConfiguration configuration = (MatrixConfiguration)project;
                TreeNodeMetadataValue[] path = TreeStructureUtil.createTreePath("", "matrix", "combination");
                TreeNodeMetadataValue matrixNode = path[0];
                TreeNodeMetadataValue combinationNode = path[1];
                Combination combination = configuration.getCombination();
                //ToString version of the combination in job-info.matrix.combination.value
                TreeStructureUtil.addValue(combinationNode, combination.toString(',', ':'), "", "value");
                //Each axis in job-info.matrix.combination.[name]=[value]
                for (Map.Entry<String, String> axis : combination.entrySet()) {
                    TreeStructureUtil.addValue(combinationNode, axis.getValue(), "", "axis", axis.getKey());
                }
                jobInfo.addChild(matrixNode);
            }
            logger.finer("Adding standard generated metadata");
View Full Code Here

            }
            if (StringUtils.isBlank(getCombinationFilter())) {
              // no combination filter stands for all children.
              return true;
            }
            Combination c = run.getParent().getCombination();
            AxisList axes = run.getParent().getParent().getAxes();
           
            return c.evalGroovyExpression(axes, getCombinationFilter());
          }
        }
      );
    } else {
      return Arrays.<AbstractBuild<?,?>>asList(build);
View Full Code Here

TOP

Related Classes of hudson.matrix.Combination$BooleanCategory

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.