Examples of PrepareBuildProjectsTask


Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

    {
        Map<String, PrepareBuildProjectsTask> map = getDistributedBuildProjects();
       
        for ( String url : map.keySet() )
        {
            PrepareBuildProjectsTask task = map.get( url );
           
            for ( Integer id : task.getProjectsBuildDefinitionsMap().keySet() )
            {
                if ( projectId == id )
                {
                    return url;
                }
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

    private ContinuumNotificationDispatcher notifierDispatcher;

    public void executeTask( Task task )
        throws TaskExecutionException
    {
        PrepareBuildProjectsTask prepareTask = (PrepareBuildProjectsTask) task;
       
        Map<Integer, Integer> projectsBuildDefinitionsMap = prepareTask.getProjectsBuildDefinitionsMap();
        int trigger = prepareTask.getTrigger();
        Set<Integer> projectsId = projectsBuildDefinitionsMap.keySet();
        Map context = new HashMap();

        try
        {
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

            Map<String, PrepareBuildProjectsTask> map = distributedBuildManager.getDistributedBuildProjects();

            for ( String url : map.keySet() )
            {
               PrepareBuildProjectsTask task = map.get( url );
              
               ProjectGroup projectGroup = getContinuum().getProjectGroup( task.getProjectGroupId() );
              
               DistributedBuildSummary summary = new DistributedBuildSummary();
               summary.setUrl( url );
               summary.setProjectGroupId( task.getProjectGroupId() );
               summary.setProjectGroupName( projectGroup.getName() );
               summary.setScmRootAddress( task.getScmRootAddress() );
              
               ProjectScmRoot scmRoot = getContinuum().getProjectScmRootByProjectGroupAndScmRootAddress( task.getProjectGroupId(),
                                                                                                         task.getScmRootAddress() );
               if ( scmRoot.getState() == ContinuumProjectState.UPDATING )
               {
                   summary.setCancelEnabled( false );
               }
               else
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

        {
            if ( configurationService.isDistributedBuildEnabled() )
            {
                if ( !taskQueueManager.isInDistributedBuildQueue( projectGroupId, scmRootAddress ) )
                {
                    PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger,
                                                                      projectGroupId, group.getName(),
                                                                      scmRootAddress, scmRootId );
                   
                    taskQueueManager.getDistributedBuildQueue().put( task );
                }
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

    public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId )
        throws BuildManagerException
    {
        try
        {           
            PrepareBuildProjectsTask task =
                new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger, projectGroupId, projectGroupName, scmRootAddress, scmRootId );
           
            log.info( "Queueing prepare-build-project task '" + task + "' to prepare-build queue." );
            prepareBuildQueue.put( task );
        }
        catch ( TaskQueueException e )
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

                {
                    Set<Integer> keySet = overallBuildQueues.keySet();
                    for ( Integer key : keySet )
                    {
                        overallBuildQueue = overallBuildQueues.get( key );
                        PrepareBuildProjectsTask task =
                            (PrepareBuildProjectsTask) overallBuildQueue.getPrepareBuildTaskQueueExecutor().getCurrentTask();
                        if ( task != null && task.getProjectGroupId() == projectGroupId &&
                            task.getProjectScmRootId() == scmRootId )
                        {
                            overallBuildQueue.cancelPrepareBuildTask( projectGroupId, scmRootId );
                            return true;
                        }
                    }
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

                {
                    Set<Integer> keySet = overallBuildQueues.keySet();
                    for ( Integer key : keySet )
                    {
                        overallBuildQueue = overallBuildQueues.get( key );
                        PrepareBuildProjectsTask task =
                            (PrepareBuildProjectsTask) overallBuildQueue.getPrepareBuildTaskQueueExecutor().getCurrentTask();
                        if ( task != null )
                        {
                            Map<Integer, Integer> map = task.getProjectsBuildDefinitionsMap();

                            if ( map.size() > 0 )
                            {
                                Set<Integer> projectIds = map.keySet();
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

        }

        OverallBuildQueue overallBuildQueue = getOverallBuildQueue( PREPARE_BUILD_QUEUE,
                                                                    buildDef.getSchedule().getBuildQueues() );

        PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, buildTrigger,
                                                                      projectGroupId, projectGroupName, scmRootAddress,
                                                                      scmRootId );

        try
        {
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

            Map<String, PrepareBuildProjectsTask> currentBuilds = new HashMap<String, PrepareBuildProjectsTask>();
            Set<Integer> keys = overallBuildQueues.keySet();
            for ( Integer key : keys )
            {
                OverallBuildQueue overallBuildQueue = overallBuildQueues.get( key );
                PrepareBuildProjectsTask task =
                    (PrepareBuildProjectsTask) overallBuildQueue.getPrepareBuildTaskQueueExecutor().getCurrentTask();
                if ( task != null )
                {
                    currentBuilds.put( overallBuildQueue.getName(), task );
                }
View Full Code Here

Examples of org.apache.continuum.taskqueue.PrepareBuildProjectsTask

    }

    public void testCheckoutPrepareBuildMultiModuleProject()
        throws Exception
    {
        PrepareBuildProjectsTask task = createTask( "src/test-projects/multi-module/pom.xml", false, false );

        List<Project> projects = getProjectDao().getProjectsInGroup( task.getProjectGroupId() );

        assertEquals( "failed to add all projects", 4, projects.size() );

        Project rootProject = getProjectDao().getProjectByName( "multi-module-parent" );
        Project moduleA = getProjectDao().getProjectByName( "module-A" );
        Project moduleB = getProjectDao().getProjectByName( "module-B" );
        Project moduleD = getProjectDao().getProjectByName( "module-D" );

        buildsManager.prepareBuildProjects( task.getProjectsBuildDefinitionsMap(), task.getBuildTrigger(),
                                            task.getProjectGroupId(), task.getProjectGroupName(),
                                            task.getScmRootAddress(), task.getProjectScmRootId() );

        // wait while task finishes prepare build
        waitForPrepareBuildToFinish( task.getProjectGroupId(), task.getProjectScmRootId() );

        ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( task.getProjectScmRootId() );
        assertEquals( "Failed to update multi-module project", ContinuumProjectState.UPDATED, scmRoot.getState() );

        File workingDir = configurationService.getWorkingDirectory();

        assertTrue( "checkout directory of project 'multi-module-parent' does not exist.", new File( workingDir,
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.