Package org.apache.continuum.taskqueue

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


        }

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

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

        try
        {
View Full Code Here

            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

    }

    public void executeTask( Task task )
        throws TaskExecutionException
    {
        PrepareBuildProjectsTask prepareBuildTask = (PrepareBuildProjectsTask) task;

        try
        {
            SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ), "",
                                                                                        configurationService.getSharedSecretPassword() );

            log.info( "initializing buildContext for projectGroupId=" + prepareBuildTask.getProjectGroupId() );
            List<Map<String, Object>> buildContext = initializeBuildContext(
                prepareBuildTask.getProjectsBuildDefinitionsMap(), prepareBuildTask.getBuildTrigger(),
                prepareBuildTask.getScmRootAddress(), prepareBuildTask.getProjectScmRootId() );

            startTime = System.currentTimeMillis();
            client.buildProjects( buildContext );
            endTime = System.currentTimeMillis();
        }
View Full Code Here

    }

    public void executeTask( Task task )
        throws TaskExecutionException
    {
        PrepareBuildProjectsTask prepareBuildTask = (PrepareBuildProjectsTask) task;

        try
        {
            SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );

            log.info( "initializing buildContext" );
            List buildContext = initializeBuildContext( prepareBuildTask.getProjectsBuildDefinitionsMap(),
                                                        prepareBuildTask.getTrigger(),
                                                        prepareBuildTask.getScmRootAddress() );

            startTime = System.currentTimeMillis();
            client.buildProjects( buildContext );

            endTime = System.currentTimeMillis();
View Full Code Here

        {
            if ( taskQueueExecutor.getCurrentTask() != null )
            {
                if ( taskQueueExecutor.getCurrentTask() instanceof PrepareBuildProjectsTask )
                {
                    PrepareBuildProjectsTask currentTask = (PrepareBuildProjectsTask) taskQueueExecutor.getCurrentTask();
                   
                    if ( currentTask.getProjectGroupId() == projectGroupId &&
                         currentTask.getScmRootAddress().equals( scmRootAddress ) )
                    {
                        log.info( "cancelling task for project group " + projectGroupId +
                                  " with scm root address " + scmRootAddress );
                        taskQueueExecutor.cancelTask( currentTask );
View Full Code Here

        {
            ThreadedDistributedBuildTaskQueueExecutor taskQueueExecutor = taskQueueExecutors.get( url );

            if ( taskQueueExecutor.getCurrentTask() != null )
            {
                PrepareBuildProjectsTask task = (PrepareBuildProjectsTask) taskQueueExecutor.getCurrentTask();
               
                map.put( url, task );
            }
        }
View Full Code Here

    {
        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

    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

            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

TOP

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

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.