Examples of DistributedReleaseManager


Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

            return REQUIRES_AUTHORIZATION;
        }

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager distributedReleaseManager = getContinuum().getDistributedReleaseManager();

            try
            {
                result = distributedReleaseManager.getReleaseResult( releaseId );
            }
            catch ( BuildAgentConfigurationException e )
            {
                addActionError( "release" );
                return "viewResultError";
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

        listenerSummary = new ReleaseListenerSummary();

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager distributedReleaseManager = getContinuum().getDistributedReleaseManager();
            Map listenerMap;
            try
            {
                listenerMap  = distributedReleaseManager.getListener( releaseId );
            }
            catch ( BuildAgentConfigurationException e )
            {
                addActionError( "" );
                return "";
            }
               
            if ( listenerMap != null && !listenerMap.isEmpty() )
            {
                int state = DistributedReleaseUtil.getReleaseState( listenerMap );

                if ( state == ContinuumReleaseManagerListener.FINISHED )
                {
                    distributedReleaseManager.removeListener( releaseId );
   
                    result = distributedReleaseManager.getReleaseResult( releaseId );
   
                    status = "finished";
                }
                else
                {
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

            return REQUIRES_AUTHORIZATION;
        }

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager releaseManager = getContinuum().getDistributedReleaseManager();

            try
            {
                releaseManager.releaseRollback( releaseId, projectId );
            }
            catch ( BuildAgentConfigurationException e )
            {
                List<String> args = new ArrayList<String>();
                args.add( e.getMessage() );

                addActionError( getText( "releaseRollback.error", args ) );
                return ERROR;
            }
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
   
            Project project = getContinuum().getProject( projectId );
   
            releaseManager.rollback( releaseId, workingDirectoryService.getWorkingDirectory( project ).getPath(), listener );
   
            //recurse until rollback is finished
            while ( listener.getState() != ContinuumReleaseManagerListener.FINISHED )
            {
                try
                {
                    Thread.sleep( 1000 );
                }
                catch ( InterruptedException e )
                {
                    //do nothing
                }
            }
            String resource = project.getGroupId() + ":" + project.getArtifactId() + ":" + project.getVersion();
            AuditLog event = new AuditLog( resource, AuditLogConstants.ROLLBACK_RELEASE );
            event.setCategory( AuditLogConstants.PROJECT );
            event.setCurrentUser( getPrincipal() );
            event.log();
   
            releaseManager.getPreparedReleases().remove( releaseId );
        }

        return SUCCESS;
    }
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

        prepareGoals = "clean integration-test";

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager distributedReleaseManager = getContinuum().getDistributedReleaseManager();

            try
            {
                getReleasePluginParameters( distributedReleaseManager.getReleasePluginParameters( projectId, "pom.xml" ) );

                projects = distributedReleaseManager.processProject( projectId, "pom.xml", autoVersionSubmodules );
            }
            catch ( BuildAgentConfigurationException e )
            {
                List<String> args = new ArrayList<String>();
                args.add( e.getMessage() );
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

        Map<String, String> environments = getEnvironments( profile );

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager distributedReleaseManager = getContinuum().getDistributedReleaseManager();

            try
            {
                releaseId = distributedReleaseManager.releasePrepare( project, getReleaseProperties(), getRelVersionMap(), getDevVersionMap(),
                                                                      environments );

                if ( releaseId == null )
                {
                    addActionError( "" );
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

            return REQUIRES_AUTHORIZATION;
        }

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager distributedReleaseManager = getContinuum().getDistributedReleaseManager();

            try
            {
                result = distributedReleaseManager.getReleaseResult( releaseId );
            }
            catch ( BuildAgentConfigurationException e )
            {
                addActionError( "release" );
                return "viewResultError";
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

        listenerSummary = new ReleaseListenerSummary();

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager distributedReleaseManager = getContinuum().getDistributedReleaseManager();
            Map listenerMap;
            try
            {
                listenerMap  = distributedReleaseManager.getListener( releaseId );
            }
            catch ( BuildAgentConfigurationException e )
            {
                addActionError( "" );
                return "";
            }
               
            if ( listenerMap != null && !listenerMap.isEmpty() )
            {
                int state = DistributedReleaseUtil.getReleaseState( listenerMap );

                if ( state == ContinuumReleaseManagerListener.FINISHED )
                {
                    distributedReleaseManager.removeListener( releaseId );
   
                    result = distributedReleaseManager.getReleaseResult( releaseId );
   
                    status = "finished";
                }
                else
                {
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

            return REQUIRES_AUTHORIZATION;
        }

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager releaseManager = getContinuum().getDistributedReleaseManager();

            try
            {
                releaseManager.releaseRollback( releaseId, projectId );
            }
            catch ( BuildAgentConfigurationException e )
            {
                List<String> args = new ArrayList<String>();
                args.add( e.getMessage() );

                addActionError( getText( "releaseRollback.error", args ) );
                return ERROR;
            }
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
   
            Project project = getContinuum().getProject( projectId );
   
            releaseManager.rollback( releaseId, workingDirectoryService.getWorkingDirectory( project ).getPath(), listener );
   
            //recurse until rollback is finished
            while ( listener.getState() != ContinuumReleaseManagerListener.FINISHED )
            {
                try
                {
                    Thread.sleep( 1000 );
                }
                catch ( InterruptedException e )
                {
                    //do nothing
                }
            }
   
            releaseManager.getPreparedReleases().remove( releaseId );
        }

        return SUCCESS;
    }
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

        listenerSummary = new ReleaseListenerSummary();

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager releaseManager = getContinuum().getDistributedReleaseManager();

            Map map;

            try
            {
                map = releaseManager.getListener( releaseId );
            }
            catch ( BuildAgentConfigurationException e )
            {
                List<String> args = new ArrayList<String>();
                args.add( e.getMessage() );

                addActionError( getText( "releaseInProgress.error", args ) );
                return ERROR;
            }

            if ( map != null && !map.isEmpty() )
            {
                int state = DistributedReleaseUtil.getReleaseState( map );

                if ( state == ContinuumReleaseManagerListener.LISTENING )
                {
                    status = "inProgress";
                }
                else if ( state == ContinuumReleaseManagerListener.FINISHED )
                {
                    status = SUCCESS;
                }
                else
                {
                    status = "initialized";
                }
   
                if ( status.equals( SUCCESS ) )
                {
                    ReleaseResult result = releaseManager.getReleaseResult( releaseId );
   
                    if ( result != null && getContinuum().getContinuumReleaseResult( projectId, releaseGoal, result.getStartTime(), result.getEndTime() ) == null )
                    {
                        ContinuumReleaseResult releaseResult = createContinuumReleaseResult( result );
                        getContinuum().addContinuumReleaseResult( releaseResult );
                    }
                }

                listenerSummary.setPhases( DistributedReleaseUtil.getReleasePhases( map ) );
                listenerSummary.setCompletedPhases( DistributedReleaseUtil.getCompletedReleasePhases( map ) );
                listenerSummary.setInProgress( DistributedReleaseUtil.getReleaseInProgress( map ) );
                listenerSummary.setError( DistributedReleaseUtil.getReleaseError( map ) );
            }
            else
            {
                throw new Exception( "There is no on-going or finished release operation with id " + releaseId );
            }
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
   
            if ( listener != null )
            {
                if ( listener.getState() == ContinuumReleaseManagerListener.LISTENING )
                {
                    status = "inProgress";
                }
                else if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
                {
                    status = SUCCESS;
                }
                else
                {
                    status = "initialized";
                }

                listenerSummary.setPhases( listener.getPhases() );
                listenerSummary.setCompletedPhases( listener.getCompletedPhases() );
                listenerSummary.setInProgress( listener.getInProgress() );
                listenerSummary.setError( listener.getError() );
            }
            else
            {
                throw new Exception( "There is no on-going or finished release operation with id " + releaseId );
            }

            if ( status.equals( SUCCESS ) )
            {
                ReleaseResult result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );

                if ( result != null && getContinuum().getContinuumReleaseResult( projectId, releaseGoal, result.getStartTime(), result.getEndTime() ) == null )
                {
                    ContinuumReleaseResult releaseResult = createContinuumReleaseResult( result );
                    getContinuum().addContinuumReleaseResult( releaseResult );
View Full Code Here

Examples of org.apache.continuum.release.distributed.manager.DistributedReleaseManager

        listenerSummary = new ReleaseListenerSummary();

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            DistributedReleaseManager releaseManager = getContinuum().getDistributedReleaseManager();

            try
            {
                Map map = releaseManager.getListener( releaseId );
   
                if ( map != null && !map.isEmpty() )
                {
                    int state = DistributedReleaseUtil.getReleaseState( map );
   
                    listenerSummary.setPhases( DistributedReleaseUtil.getReleasePhases( map ) );
                    listenerSummary.setCompletedPhases( DistributedReleaseUtil.getCompletedReleasePhases( map ) );
                    listenerSummary.setInProgress( DistributedReleaseUtil.getReleaseInProgress( map ) );
                    listenerSummary.setError( DistributedReleaseUtil.getReleaseError( map ) );
   
                    if ( state == ContinuumReleaseManagerListener.FINISHED )
                    {
                        result = releaseManager.getReleaseResult( releaseId );
       
                        return SUCCESS;
                    }
                    else
                    {
                        throw new Exception( "The release operation with id " + releaseId + "has not finished yet." );
                    }
                }
                else
                {
                    throw new Exception( "There is no finished release operation with id " + releaseId );
                }
            }
            catch ( BuildAgentConfigurationException e )
            {
                List<String> args = new ArrayList<String>();
                args.add( e.getMessage() );
               
                addActionError( getText( "releaseViewResult.error", args ) );
                return ERROR;
            }
        }
        else
        {
            ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
   
            listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
   
            if ( listener != null )
            {
                listenerSummary.setPhases( listener.getPhases() );
                listenerSummary.setCompletedPhases( listener.getCompletedPhases() );
                listenerSummary.setInProgress( listener.getInProgress() );
                listenerSummary.setError( listener.getError() );

                if ( listener.getState() == ContinuumReleaseManagerListener.FINISHED )
                {
                    result = (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );
   
                    return SUCCESS;
                }
                else
                {
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.