Package hudson.matrix

Examples of hudson.matrix.AxisList$ConverterImpl


            setBody( "Boom goes the dynamite." );
        }} );
    }

    private void addSlaveToProject(int ... slaveInxes ) throws IOException {
        AxisList list = new AxisList();
        List<String> values = new LinkedList<String>();
        for (int slaveInx : slaveInxes) {
            values.add(slaves.get(slaveInx).getLabelString());
        }
        list.add(new Axis("label",values));
        project.setAxes(list);
    }
View Full Code Here


        assertEquals(0, downstreamProjects.size());
    }
   
    public void testMatrixDependency() throws Exception {
        MatrixProject matrixProject = createMatrixProject();
        matrixProject.setAxes(new AxisList(new Axis("foo", "a", "b")));
        FreeStyleProject freestyleProject = createFreeStyleProjectWithFingerprints(singleContents, singleFiles);
        addFingerprinterToProject(matrixProject, singleContents, singleFiles);

        hudson.rebuildDependencyGraph();
View Full Code Here

        MatrixProject m = createMatrixProject();
        m.addProperty(new ParametersDefinitionProperty(
                new StringParameterDefinition("FOO","value")
        ));
        m.getBuildersList().add(new Shell("sleep 3"));
        m.setAxes(new AxisList(new TextAxis("DoesntMatter", "aaa","bbb")));

        List<Future<MatrixBuild>> r = new ArrayList<Future<MatrixBuild>>();

        for (int i=0; i<3; i++)
            r.add(m.scheduleBuild2(0,new UserIdCause(),new ParametersAction(new StringParameterValue("FOO","value"+i))));
View Full Code Here

    }



    private AxisList getAxisList(BuildConfiguration buildConfiguration) {
        AxisList  axisList = new AxisList(new Axis("script", "main"));
        if (buildConfiguration.isMultiLanguageVersions() && buildConfiguration.isMultiScript()) {
            axisList = new AxisList(new Axis("language_version", buildConfiguration.getLanguageVersions()), new Axis("script", buildConfiguration.getScriptKeys()));
        }
        else if (buildConfiguration.isMultiLanguageVersions()) {
            axisList = new AxisList(new Axis("language_version", buildConfiguration.getLanguageVersions()));
        }
        else if (buildConfiguration.isMultiScript()) {
            axisList = new AxisList(new Axis("script", buildConfiguration.getScriptKeys()));
        }
        return axisList;
    }
View Full Code Here

        this.config = config;
        this.buildId = buildId;
        this.checkoutCommands = checkoutCommands;
    }
    public AxisList getAxisList() {
        AxisList  axisList = new AxisList(new Axis("command", "main"));
        if (isParallized()) {
            Set commandKeys =  ((Map) config.get("command")).keySet();
            axisList = new AxisList(new Axis("command", new ArrayList<String>(commandKeys)));
        }
        return axisList;
    }
View Full Code Here

    public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) {
        if (fromDBObject == null) return null;

        BasicDBList rawList = (BasicDBList) fromDBObject;

        AxisList axisList = new AxisList();
        for(Object obj : rawList) {
            DBObject dbObj = (DBObject) obj;
            axisList.add((Axis) getMapper().fromDBObject(optionalExtraInfo.getSubClass(), dbObj, getMapper().createEntityCache()));
        }

        return axisList;
    }
View Full Code Here

    @Override
    public Object encode(Object value, MappedField optionalExtraInfo) {
        if (value == null) return null;

        AxisList axisList = (AxisList) value;

        BasicDBList convertedList = new BasicDBList();

        for(Axis axis : axisList) {
            convertedList.add(getMapper().toDBObject(axis));
View Full Code Here

        final int[] run = new int[1]; // count the number of times the perform is called

        commit("a", johnDoe, "commit #1");

        MatrixProject mp = createMatrixProject("xyz");
        mp.setAxes(new AxisList(new Axis("VAR", "a", "b")));
        mp.setScm(new GitSCM(workDir.getAbsolutePath()));
        mp.addPublisher(new GitPublisher(
            Collections.singletonList(new TagToPush("origin", "foo", true)),
            Collections.<BranchToPush>emptyList(), true, true) {
            @Override
View Full Code Here

    public void testGetAllDiskUsageWithoutBuilds() throws Exception{
        FreeStyleProject project = j.jenkins.createProject(FreeStyleProject.class, "project1");
        MatrixProject matrixProject = j.jenkins.createProject(MatrixProject.class, "project2");
        TextAxis axis1 = new TextAxis("axis", "axisA", "axisB", "axisC");
        TextAxis axis2 = new TextAxis("axis2", "Aaxis", "Baxis", "Caxis");
        AxisList list = new AxisList();
        list.add(axis1);
        list.add(axis2);
        matrixProject.setAxes(list);      
        Long sizeOfProject = 7546l;
        Long sizeOfMatrixProject = 6800l;
        DiskUsageProperty projectProperty = project.getProperty(DiskUsageProperty.class);
        //project.addProperty(projectProperty);
View Full Code Here

    public void testGetBuildsDiskUsage() throws Exception{
        FreeStyleProject project = j.jenkins.createProject(FreeStyleProject.class, "project1");
        MatrixProject matrixProject = j.jenkins.createProject(MatrixProject.class, "project2");
        TextAxis axis1 = new TextAxis("axis", "axisA", "axisB", "axisC");
        TextAxis axis2 = new TextAxis("axis2", "Aaxis", "Baxis", "Caxis");
        AxisList list = new AxisList();
        list.add(axis1);
        list.add(axis2);
        matrixProject.setAxes(list);
        j.buildAndAssertSuccess(project);
        AbstractBuild build = project.getLastBuild();
        j.buildAndAssertSuccess(matrixProject);
        MatrixBuild matrixBuild1 = matrixProject.getLastBuild();
View Full Code Here

TOP

Related Classes of hudson.matrix.AxisList$ConverterImpl

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.