Examples of ProjectScmRoot


Examples of org.apache.continuum.model.project.ProjectScmRoot

            {
                for ( Integer buildDefId : buildDefIds )
                {
                    if ( buildDefId != null && isProjectOkToBuild( project.getId(), buildDefId ) )
                    {
                        ProjectScmRoot scmRoot = getProjectScmRootByProject( project.getId() );

                        Map<Integer, Integer> projectsAndBuildDefinitionsMap = map.get( scmRoot );

                        if ( projectsAndBuildDefinitionsMap == null )
                        {
                            projectsAndBuildDefinitionsMap = new HashMap<Integer, Integer>();
                        }

                        projectsAndBuildDefinitionsMap.put( project.getId(), buildDefId );

                        map.put( scmRoot, projectsAndBuildDefinitionsMap );

                        if ( !sortedScmRoot.contains( scmRoot ) )
                        {
                            sortedScmRoot.add( scmRoot );
                        }
                    }
                }
            }
        }

        BuildTrigger buildTrigger = new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "" );

        for ( ProjectScmRoot scmRoot : sortedScmRoot )
        {
            try
            {
                prepareBuildProjects( map.get( scmRoot ), buildTrigger, scmRoot.getScmRootAddress(),
                                      scmRoot.getProjectGroup().getId(), scmRoot.getId(), sortedScmRoot );
            }
            catch ( NoBuildAgentException e )
            {
                log.error( "Unable to build projects in project group " + scmRoot.getProjectGroup().getName()
                           + " because there is no build agent configured" );
            }
            catch ( NoBuildAgentInGroupException e )
            {
                log.error( "Unable to build projects in project group " + scmRoot.getProjectGroup().getName()
                           + " because there is no build agent configured in build agent group" );
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.