Package org.apache.continuum.buildagent.taskqueue

Examples of org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask


    public void buildProjects( List<Map<String, Object>> projectsBuildContext )
        throws ContinuumBuildAgentException
    {
        List<BuildContext> buildContextList = initializeBuildContext( projectsBuildContext );

        PrepareBuildProjectsTask task = createPrepareBuildProjectsTask( buildContextList );

        if ( task == null )
        {
            return;
        }
View Full Code Here


    {
        try
        {
            Map<String, Object> project = new HashMap<String, Object>();

            PrepareBuildProjectsTask task = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

            if ( task != null )
            {
                project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
                project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
                project.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
            }

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

    {
        try
        {
            List<Map<String, Object>> projects = new ArrayList<Map<String, Object>>();

            PrepareBuildProjectsTask task = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

            if ( task != null )
            {
                for ( BuildContext context : task.getBuildContexts() )
                {
                    Map<String, Object> map = new HashMap<String, Object>();

                    map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, context.getProjectId() );
                    map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, context.getBuildDefinitionId() );
View Full Code Here

    public boolean isProjectGroupInQueue( int projectGroupId )
    {
        try
        {
            PrepareBuildProjectsTask currentPrepareBuildTask = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

            if ( currentPrepareBuildTask != null && currentPrepareBuildTask.getProjectGroupId() == projectGroupId )
            {
                return true;
            }

            BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();
View Full Code Here

    public boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
    {
        try
        {
            PrepareBuildProjectsTask currentPrepareBuildTask = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

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

            BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();
View Full Code Here

        throws ContinuumBuildAgentException
    {
        if ( buildContexts != null && buildContexts.size() > 0 )
        {
            BuildContext context = buildContexts.get( 0 );
            return new PrepareBuildProjectsTask( buildContexts, new BuildTrigger( context.getTrigger(), context.getUsername() ),
                                             context.getProjectGroupId(), context.getScmRootAddress(), context.getScmRootId() );
        }
        else
        {
            log.info( "Nothing to build" );
View Full Code Here

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

            PrepareBuildProjectsTask task = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

            if ( task != null )
            {
                project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
                project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
                project.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getTriggeredBy() );
            }

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

        try
        {
            log.debug( "Getting projects currently preparing build" );
            List<Map<String, Object>> projects = new ArrayList<Map<String, Object>>();

            PrepareBuildProjectsTask task = buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

            if ( task != null )
            {
                for ( BuildContext context : task.getBuildContexts() )
                {
                    Map<String, Object> map = new HashMap<String, Object>();

                    map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, context.getProjectId() );
                    map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, context.getBuildDefinitionId() );
View Full Code Here

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

            PrepareBuildProjectsTask currentPrepareBuildTask =
                buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

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

    public boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
    {
        try
        {
            log.debug( "Checking if projects {} is in any queue", projectIds );
            PrepareBuildProjectsTask currentPrepareBuildTask =
                buildAgentTaskQueueManager.getCurrentProjectInPrepareBuild();

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

            BuildProjectTask currentBuildTask = buildAgentTaskQueueManager.getCurrentProjectInBuilding();
View Full Code Here

TOP

Related Classes of org.apache.continuum.buildagent.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.