Package org.apache.continuum.utils.build

Examples of org.apache.continuum.utils.build.BuildTrigger


    }

    public void buildProject( int projectId, String username )
        throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
    {
      buildProject( projectId, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, username ) );
    }
View Full Code Here


        return getString( context, KEY_USERNAME, "" );
    }
   
    public static BuildTrigger getBuildTrigger( Map<String, Object> context )
    {
        BuildTrigger defaultValue = new BuildTrigger( 0, "" );
        return (BuildTrigger) getObject( context, KEY_BUILD_TRIGGER, defaultValue );
    }
View Full Code Here

            addActionError( e.getMessage() );
            return REQUIRES_AUTHENTICATION;
        }

        getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId,
                                                 new BuildTrigger( trigger, "" ), projectName, projectGroupId );
        Project project = getContinuum().getProject( projectId );
        project.setState( project.getOldState() );
        getContinuum().updateProject( project );

        return SUCCESS;
View Full Code Here

    private BuildContext getContext()
        throws Exception
    {
        return controller.initializeBuildContext( projectId2, buildDefinitionId2,
                          new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "" ), new ScmResult() );
    }
View Full Code Here

    private void buildProject( int projectId, int trigger )
        throws Exception
    {
        ProjectGroup group = getDefaultProjectGroup();
        buildQueue.put( new BuildProjectTask( projectId, 0, new BuildTrigger( trigger, "" ), null, null, null, group.getId() ) );
    }
View Full Code Here

        buildDefinition = (BuildDefinition) projectGroup.getBuildDefinitions().get( 0 );

        // projectGroup = continuumStore.addProjectGroup( projectGroup );

        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(), new BuildTrigger( 0, "" ),
                                             project.getName(), buildDefinition.getDescription(), null, projectGroupId );

        task.setMaxExecutionTime( maxRunTime );

        return task;
View Full Code Here

        context.put( KEY_BUILD_ID, buildId );
    }

    public static BuildTrigger getBuildTrigger( Map<String, Object> context )
    {
      BuildTrigger defaultValue = new BuildTrigger( 0, "" );
      return (BuildTrigger) getObject( context, KEY_BUILD_TRIGGER, defaultValue );
    }
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
View Full Code Here

        List<Project> projects = AbstractContinuumAction.getListOfProjects( context );
        Map<Integer, BuildDefinition> projectsBuildDefinitionsMap =
            AbstractContinuumAction.getProjectsBuildDefinitionsMap( context );
        Map<Integer, ScmResult> scmResultMap = AbstractContinuumAction.getScmResultMap( context );
        List<Project> projectsToBeBuilt = new ArrayList<Project>();
        BuildTrigger buildTrigger = AbstractContinuumAction.getBuildTrigger( context );
        int projectGroupId = AbstractContinuumAction.getProjectGroupId( context );

        // update state of each project first
        for ( Project project : projects )
        {
View Full Code Here

            }
        } );

        try
        {
            continuum.buildProjectGroup( 1, new BuildTrigger( 1, "test-user" ) );
            fail( "An exception should have been thrown." );
        }
        catch ( ContinuumException e )
        {
            assertEquals( "Cannot build project group. Project (id=1) in group is currently in release stage.",
View Full Code Here

TOP

Related Classes of org.apache.continuum.utils.build.BuildTrigger

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.