Package com.groupon.jenkins.dynamic.build

Examples of com.groupon.jenkins.dynamic.build.DynamicSubProject$ParentBuildAction


    public DynamicBuildFactory withSubBuilds(DynamicSubBuild... subBuilds) {
        DynamicProject dynamicProject = mock(DynamicProject.class);
        List<DynamicSubProject> subProjects = new ArrayList<DynamicSubProject>(subBuilds.length);
        for (DynamicSubBuild subBuild : subBuilds) {
            DynamicSubProject subProject = mock(DynamicSubProject.class);
            when(subProject.getBuildByNumber(build.getNumber())).thenReturn(subBuild);
            subProjects.add(subProject);
        }
        when(dynamicProject.getItems()).thenReturn(subProjects);
        when(build.getParent()).thenReturn(dynamicProject);
        return this;
View Full Code Here


        return run != null ? run.getResult() : Result.ABORTED;
    }

    protected void scheduleSubBuilds(Iterable<Combination> subBuildCombinations, TaskListener listener) {
        for ( Combination subBuildCombination : subBuildCombinations) {
            DynamicSubProject c = dynamicBuild.getSubProject(subBuildCombination);
            listener.getLogger().println(Messages.MatrixBuild_Triggering(ModelHyperlinkNote.encodeTo(c)));
            List<Action> childActions = new ArrayList<Action>();
            childActions.addAll(Util.filter(dynamicBuild.getActions(), ParametersAction.class));
            childActions.add(new SubBuildExecutionAction(subBuildRunner));
      childActions.add(new ParentBuildAction(dynamicBuild));
            c.scheduleBuild(childActions, dynamicBuild.getCause());
        }
    }
View Full Code Here

        getDatastore().save(project);
        return project.getId();
    }

    public DynamicSubProject getChild(IdentifableItemGroup<DynamicSubProject> parent, String name) {
        DynamicSubProject subProject = getDatastore().createQuery(DynamicSubProject.class).
                disableValidation().
                field("name").equal(name).
                field("parentId").exists().
                field("parentId").equal(parent.getId()).
                get();

        if(subProject != null) {
            try {
                subProject.onLoad(parent, name);
            } catch(IOException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

TOP

Related Classes of com.groupon.jenkins.dynamic.build.DynamicSubProject$ParentBuildAction

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.