Package org.apache.continuum.model.release

Examples of org.apache.continuum.model.release.ContinuumReleaseResult


    }

    public String getReleaseOutput( int releaseResultId )
        throws ContinuumException
    {
        ContinuumReleaseResult releaseResult = getContinuumReleaseResult( releaseResultId );

        ProjectGroup projectGroup = releaseResult.getProjectGroup();

        try
        {
            return configurationService.getReleaseOutput( projectGroup.getId(), "releases-" + releaseResult.getStartTime() );
        }
        catch ( ConfigurationException e )
        {
            throw new ContinuumException( "Error while retrieving release output for release: " + releaseResultId );
        }
View Full Code Here


        throws Exception
    {
        Project project = projectDao.getProject( testProject1.getId() );
        ProjectGroup group = project.getProjectGroup();
       
        ContinuumReleaseResult releaseResult = createTestContinuumReleaseResult( group, project, "releaseGoal", 0, 0, 0 );
        releaseResult = releaseResultDao.addContinuumReleaseResult( releaseResult );
       
        List<ContinuumReleaseResult> releaseResults = releaseResultDao.getAllContinuumReleaseResults();
        assertEquals( "check size of continuum release results", 1, releaseResults.size() );
       
        ContinuumReleaseResult retrievedResult = releaseResults.get( 0 );
        assertReleaseResultEquals( releaseResult, retrievedResult );
        assertProjectGroupEquals( group, retrievedResult.getProjectGroup() );
        assertProjectEquals( project, retrievedResult.getProject() );
       
        releaseResultDao.removeContinuumReleaseResult( releaseResult );
        projectDao.removeProject( project );
        assertFalse( projectDao.getProjectsInGroup( group.getId() ).contains( project ) );
       
View Full Code Here

    protected static ContinuumReleaseResult createTestContinuumReleaseResult( ProjectGroup group, Project project,
                                                                              String releaseGoal, int resultCode,
                                                                              long startTime, long endTime )
    {
        ContinuumReleaseResult releaseResult = new ContinuumReleaseResult();
        releaseResult.setProjectGroup( group );
        releaseResult.setProject( project );
        releaseResult.setReleaseGoal( releaseGoal );
        releaseResult.setResultCode( resultCode );
        releaseResult.setStartTime( startTime );
        releaseResult.setEndTime( endTime );
       
        return releaseResult;
    }
View Full Code Here

        {
            addActionError( authzE.getMessage() );
            return REQUIRES_AUTHORIZATION;
        }
       
        ContinuumReleaseResult releaseResult = getContinuum().getContinuumReleaseResult( releaseResultId );
       
        result = new ReleaseResult();
        result.setStartTime( releaseResult.getStartTime() );
        result.setEndTime( releaseResult.getEndTime() );
        result.setResultCode( releaseResult.getResultCode() );

        releaseGoal = releaseResult.getReleaseGoal();
        projectName = releaseResult.getProject().getName();

        try
        {
            File releaseOutputFile = getContinuum().getConfiguration().getReleaseOutputFile( projectGroupId, "releases-" + releaseResult.getStartTime() );

            if ( releaseOutputFile.exists() )
            {
                String str = StringEscapeUtils.escapeHtml( FileUtils.fileRead( releaseOutputFile ) );
                result.appendOutput( str );
View Full Code Here

        ProjectGroup defaultProjectGroup = continuum.getProjectGroupByGroupId( Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID );

        assertEquals( 0, continuum.getAllContinuumReleaseResults().size() );

        ContinuumReleaseResult releaseResult = new ContinuumReleaseResult();
        releaseResult.setStartTime( System.currentTimeMillis() );

        File logFile = continuum.getConfiguration().getReleaseOutputFile( defaultProjectGroup.getId(),
                                                                          "releases-" + releaseResult.getStartTime() );
        logFile.mkdirs();

        assertTrue( logFile.exists() );

        releaseResult.setResultCode( 0 );
        releaseResult.setEndTime( System.currentTimeMillis() );
        releaseResult.setProjectGroup( defaultProjectGroup );

        releaseResult = continuum.addContinuumReleaseResult( releaseResult );

        List<ContinuumReleaseResult> releaseResults = continuum.getContinuumReleaseResultsByProjectGroup( defaultProjectGroup.getId() );
        assertEquals( 1, releaseResults.size() );
        assertEquals( releaseResult, releaseResults.get( 0 ) );

        continuum.removeContinuumReleaseResult( releaseResult.getId() );
        assertEquals( 0 , continuum.getAllContinuumReleaseResults().size() );
        assertFalse( logFile.exists() );
        assertEquals( defaultProjectGroup, continuum.getProjectGroupByGroupId( Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.continuum.model.release.ContinuumReleaseResult

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.