Package org.apache.continuum.taskqueue

Examples of org.apache.continuum.taskqueue.BuildProjectTask


        {
            buildDefinitionLabel = buildDefinition.getGoals();
        }

        Task buildTask =
            new BuildProjectTask( projectId, buildDefinition.getId(), trigger, projectName, buildDefinitionLabel );
        try
        {
            log.info( "Project '" + projectName + "' added to overall build queue '" + overallBuildQueue.getName() + "'." );
            overallBuildQueue.addToBuildQueue( buildTask );
        }
View Full Code Here


                    if ( StringUtils.isEmpty( buildDefinitionLabel ) )
                    {
                        buildDefinitionLabel = buildDefinition.getGoals();
                    }

                    BuildProjectTask buildTask =
                        new BuildProjectTask( project.getId(), buildDefinition.getId(), trigger, project.getName(),
                                              buildDefinitionLabel );
                    buildTask.setMaxExecutionTime( buildDefinition.getSchedule().getMaxJobExecutionTime() * 1000 );

                    try
                    {
                        log.info( "Project '" + project.getId() + "' - '" + project.getName() +
                            "' added to overall build queue '" + overallBuildQueue.getName() + "'." );
View Full Code Here

                {
                    Set<Integer> keySet = overallBuildQueues.keySet();
                    for( Integer key : keySet )
                    {
                        overallBuildQueue = overallBuildQueues.get( key );
                        BuildProjectTask buildTask = (BuildProjectTask) overallBuildQueue.getBuildTaskQueueExecutor().getCurrentTask();
                        if( buildTask != null && buildTask.getProjectId() == projectId )
                        {
                            overallBuildQueue.cancelBuildTask( projectId );
                            return true;
                        }
                    }
View Full Code Here

        {
            Set<Integer> keys = overallBuildQueues.keySet();
            for( Integer key : keys )
            {
                OverallBuildQueue overallBuildQueue = overallBuildQueues.get( key );
                BuildProjectTask task = (BuildProjectTask) overallBuildQueue.getBuildTaskQueueExecutor().getCurrentTask();
                if( task != null && task.getProjectId() == projectId )
                {
                    return true;
                }
            }
            return false;
View Full Code Here

        }

       
        for ( Task task : tasks )
        {           
            BuildProjectTask buildTask = (BuildProjectTask) task;
            try
            {
                BuildDefinition buildDefinition =
                    buildDefinitionDao.getBuildDefinition( buildTask.getBuildDefinitionId() );
           
                buildProject( buildTask.getProjectId(), buildDefinition, buildTask.getProjectName(),
                              buildTask.getTrigger() );
            }
            catch ( ContinuumStoreException e )
            {
                log.error( "Unable to queue build task for project '" + buildTask.getProjectName() + "'" );
                continue;
            }
        }

        for ( CheckOutTask task : checkoutTasks )
View Full Code Here

        try
        {
            log.debug( "Getting currently building project" );
            Map<String, Object> project = new HashMap<String, Object>();

            BuildProjectTask task = buildAgentTaskQueueManager.getCurrentProjectInBuilding();

            if ( task != null )
            {
                project.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, new Integer( task.getProjectId() ) );
                project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, new Integer(
                    task.getBuildDefinitionId() ) );
                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
                project.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getTriggeredBy() );
                project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_LABEL, task.getBuildDefinitionLabel() );
            }

            return project;
        }
        catch ( TaskQueueManagerException e )
View Full Code Here

                    log.debug( "projectGroup {} is in build queue", projectGroupId );
                    return true;
                }
            }

            BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();

            if ( currentBuildTask != null && currentBuildTask.getProjectGroupId() == projectGroupId )
            {
                log.debug( "projectGroup {} is currently building", projectGroupId );
                return true;
            }
        }
View Full Code Here

            if ( currentPrepareBuildTask != null && currentPrepareBuildTask.getScmRootId() == projectScmRootId )
            {
                return true;
            }

            BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();

            if ( currentBuildTask != null )
            {
                int projectId = currentBuildTask.getProjectId();

                for ( Integer pid : projectIds )
                {
                    if ( pid == projectId )
                    {
View Full Code Here

    {
        try
        {
            log.debug( "Checking if projectId={}, buildDefinitionId={} is currently building", projectId,
                       buildDefinitionId );
            BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();

            if ( currentBuildTask != null && currentBuildTask.getProjectId() == projectId &&
                ( buildDefinitionId == -1 || currentBuildTask.getBuildDefinitionId() == buildDefinitionId ) )
            {
                log.debug( "projectId={}, buildDefinitionId={} is currently building" );
                return true;
            }
        }
View Full Code Here

            Map<String, BuildProjectTask> currentBuilds = buildsManager.getCurrentBuilds();
            Set<String> keys = currentBuilds.keySet();

            for ( String key : keys )
            {
                BuildProjectTask task = currentBuilds.get( key );
                if ( task != null )
                {
                    int projectId = task.getProjectId();

                    Project project = projectDao.getProject( projectId );
                    LocalRepository repository = project.getProjectGroup().getLocalRepository();

                    if ( repository != null && repository.getId() == repositoryId )
View Full Code Here

TOP

Related Classes of org.apache.continuum.taskqueue.BuildProjectTask

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.